Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#44299 - [postgresql]Shutdown/startup oddity!

Attached to Project: Arch Linux
Opened by Neil Darlow (neildarlow) - Sunday, 22 March 2015, 11:12 GMT
Last edited by Dan McGee (toofishes) - Sunday, 24 May 2015, 13:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: I restarted my Arch system (x86_64) running Postgresql using "systemctl reboot". Following the boot the postgresql service was reported as being in a failed state by systemctl status -l. The stated reason was that a postmaster process may already be running at startup time.

Looking into the pg_log files I saw a message to the effect that Postgresql had not been properly shutdown and the following, manual, start initiated a recovery process.

I see that the postgresql.service file has a TimeoutSec=120 and postgresql is started with a -w 120 option. Are these values adequate for a proper and complete shutdown/startup sequence?


Additional info:
postgresql 9.4.1-1
postgresql-libs 9.4.1-1

-- Reboot --
Mar 21 21:45:37 optimus postgres[556]: LOG: redirecting log output to logging collector process <-- Boot, postgresql.service enters failed state.
Mar 21 21:45:37 optimus postgres[556]: HINT: Future log output will appear in directory "pg_log".
Mar 21 21:45:41 optimus postgres[556]: pg_ctl: this data directory appears to be running a pre-existing postmaster
Mar 21 21:45:41 optimus postgres[556]: pg_ctl: could not start server
Mar 21 21:45:41 optimus postgres[556]: Examine the log output.
Mar 21 21:57:40 optimus postgres[1786]: LOG: redirecting log output to logging collector process <-- Manual start of postgresql following failed state.
Mar 21 21:57:40 optimus postgres[1786]: HINT: Future log output will appear in directory "pg_log".

-- pg_log/postgresql-2015-03-21_214537.log --
LOG: database system was shut down at 2015-03-21 21:44:33 GMT
LOG: database system is ready to accept connections
LOG: autovacuum launcher started

-- pg_log/postgresql-2015-03-21_215740.log --
LOG: database system was interrupted; last known up at 2015-03-21 21:45:37 GMT
LOG: database system was not properly shut down; automatic recovery in progress
LOG: record with zero length at 0/EC1DF68
LOG: redo is not required
LOG: database system is ready to accept connections
LOG: autovacuum launcher started

Steps to reproduce:
Reboot system and observe journalctl and pg_log output.
This task depends upon

Closed by  Dan McGee (toofishes)
Sunday, 24 May 2015, 13:51 GMT
Reason for closing:  Works for me
Comment by Dan McGee (toofishes) - Sunday, 24 May 2015, 13:51 GMT
These values may not always be appropriate, especially if you have a large cluster where recovery takes a significant amount of time. However, in these cases, you should customize or override the unit configuration file yourself; we won't be able to cater to all audiences with our out of the box configuration file.

Loading...