3

We are currently installing Postgresql from the PostgreSQL apt repository. Is there some way to get "apt-get install postgresql-9.6" to use the --data-checksums option when setting up the cluster?

Or do we need to install Postgresql differently?

asked Apr 18, 2017 at 6:41

2 Answers 2

5

If you do not want to install and drop the cluster on Debian and related, you could:

  • Install postgresql-common;
  • Edit the /etc/postgresql-common/createcluster.conf file to allow the use of the --data-checksums option;
  • Install postgresql-9.6.
answered Apr 18, 2017 at 8:35
3

When you use apt-get, it creates a cluster without data checksum. All you have to do is to drop the newly created cluster:

pg_dropcluster 9.6 main

and create a new one with that option

pg_createcluster 9.6 <clusterName> <Youroptions (datachecksum for example)>

Or you can change the file /usr/share/postgresql-common/createcluster.conf to put your data-checksum option there.

Michael Green
25.3k13 gold badges54 silver badges100 bronze badges
answered Apr 18, 2017 at 7:15
1
  • Tx. I tried KookieMonster's 'Install postgresql-common' solution and it worked. I really didn't want to put a 'pg_dropcluster' line in my chef script! Commented Apr 19, 2017 at 11:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.