Arch Linux

Please read this before reporting a bug:

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!

FS#23529 - [postgresql] Use "fast" shutdown method in rc script

Attached to Project: Arch Linux
Opened by Paul Gideon Dann (giddie) - Thursday, 31 March 2011, 11:02 GMT
Last edited by Dan McGee (toofishes) - Friday, 01 April 2011, 18:26 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Paul Mattal (paul)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


When stopping PostgreSQL using the rc script, the default "smart" shutdown method is used, and PostgreSQL waits for all clients to disconnect. However, if this occurs at shutdown, waiting for clients to disconnect is usually overkill, as the services which relied on the database (e.g. http server) will already have been shut down. What's more, if pg_ctl gives up waiting (this happens most times on my server), the shutdown sequence continues, and PostgreSQL ends up getting TERMed.

The solution is to use the "fast" shutdown method, which closes client connections immediately and shuts down PostgreSQL cleanly. This can be added using the "-m fast" switch to the pg_ctl line in the rc script. I think this behaviour is closer to what is expected from an rc script. Smart shutdowns can still be carried out manually, using pg_ctl.

Additional info:
* 9.0.3-1
This task depends upon

Closed by  Dan McGee (toofishes)
Friday, 01 April 2011, 18:26 GMT
Reason for closing:  Implemented
Additional comments about closing:  Implemented on trunk, will be in next package release