FS#34975 - [postgresql] /var/lib/postgresql is not owned by postgres user
Attached to Project:
Arch Linux
Opened by Konstantin Gribov (gross) - Friday, 26 April 2013, 19:08 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 19 January 2014, 20:04 GMT
Opened by Konstantin Gribov (gross) - Friday, 26 April 2013, 19:08 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Sunday, 19 January 2014, 20:04 GMT
|
Details
Description:
After installing postgresql it isn't initialized. On trying to start it with `systemctl start postgresql.service` it fails and writes to journal that it should be initialized with `su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"`. But this command fails because `/var/lib/postgres` is owned by root. I think two things should be done: 1. Print info about initializing postgres in post-install hook. 2. Own /var/lib/postgres by postgres:postgres in package phase. Additional info: * postgresql 9.2.4-1 Steps to reproduce (DO NOT RUN IF YOU HAVE NONEMPTY POSTGRES DB, it will destroy your data and eat your brain): 1. su -c "pacman -S postgresql" 2. su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'" |
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Sunday, 19 January 2014, 20:04 GMT
Reason for closing: Fixed
Sunday, 19 January 2014, 20:04 GMT
Reason for closing: Fixed
Comment by
Martin Imobersteg (bugix) - Tuesday,
10 September 2013, 08:13 GMT
9.3 could be a wonderful spot to fix this bug ;-)
Comment by Dan McGee (toofishes) -
Friday, 06 December 2013, 15:55 GMT
I should have this fixed in the minor version bump I am doing now;
the data directory will be created with the correct permissions.
Comment by
Konstantin Gribov (gross) - Friday,
06 December 2013, 22:08 GMT
Ok, thank you. I think it'll be also good to add info about db
initialization to post_install message.