Re: Log notice that checkpoint is to be written on shutdown
От
Michael Banck
Тема
Re: Log notice that checkpoint is to be written on shutdown
Дата
Msg-id
1413487860.12271.13.camel@hartree.muc.credativ.lan
Ответ на
Log notice that checkpoint is to be written on shutdown (Michael Banck)
Список
Дерево обсуждения
Log notice that checkpoint is to be written on shutdown Michael Banck <michael.banck@credativ.de>
Re: Log notice that checkpoint is to be written on shutdown David G Johnston <david.g.johnston@gmail.com>
Re: Log notice that checkpoint is to be written on
shutdown Michael Banck <michael.banck@credativ.de>
Re: Log notice that checkpoint is to be written on shutdown Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Log notice that checkpoint is to be written on
shutdown Michael Banck <michael.banck@credativ.de>
Re: Log notice that checkpoint is to be written on shutdown Michael Banck <michael.banck@credativ.de>
Re: Log notice that checkpoint is to be written on shutdown Simon Riggs <simon@2ndQuadrant.com>
Re: Log notice that checkpoint is to be written on shutdown Andres Freund <andres@2ndquadrant.com>
Re: Log notice that checkpoint is to be written on shutdown Stephen Frost <sfrost@snowman.net>
Re: Log notice that checkpoint is to be written on shutdown Tom Lane <tgl@sss.pgh.pa.us>
Re: Log notice that checkpoint is to be written on shutdown Andres Freund <andres@2ndquadrant.com>
Re: Log notice that checkpoint is to be written on shutdown Stephen Frost <sfrost@snowman.net>
Re: Log notice that checkpoint is to be written on shutdown Tom Lane <tgl@sss.pgh.pa.us>
Re: Log notice that checkpoint is to be written on shutdown Stephen Frost <sfrost@snowman.net>
Re: Log notice that checkpoint is to be written on shutdown Marti Raudsepp <marti@juffo.org>
Re: Log notice that checkpoint is to be written on shutdown Jeff Janes <jeff.janes@gmail.com>
Re: Log notice that checkpoint is to be written on shutdown Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Log notice that checkpoint is to be written on
shutdown Michael Banck <michael.banck@credativ.de>
Re: Log notice that checkpoint is to be written on shutdown Robert Haas <robertmhaas@gmail.com>
Re: Log notice that checkpoint is to be written on shutdown Jeff Janes <jeff.janes@gmail.com>
Hi, Am Donnerstag, den 02.10.2014, 15:21 +0200 schrieb Michael Banck: > we have seen repeatedly that users can be confused about why PostgreSQL > is not shutting down even though they requested it. Usually, this is > because `log_checkpoints' is not enabled and the final checkpoint is > being written, delaying shutdown. As no message besides "shutting down" > is written to the server log in this case, we even had users believing > the server was hanging and pondering killing it manually. There were some comments that this might not actually be the case and/or that the postmaster was simply waiting for clients to disconnect due to smart shutdown being invoked. About the former, it might be possible to hook into the checkpoint code and try to estimate how much I/O is to be written, and decide on some threshold above which a warning is issued, but this looks rather fragile so I won't try to tackle it now. About the latter, this is a valid concern, and I decided to add a WARNING in this case (if normal clients are connected), thus moving into the "additional logging on shutdown" territory. The other point was changing the default shutdown method and/or the default for the log_checkpoints parameter. The former has not been discussed much and the latter was contentious - I won't touch those either. And even if the defaults are changed, old installations might still carry the old defaults or DBAs might change them for whatever reasons, so ISTM additional logging is rather orthogonal to that. Finally, I am not convinced changing the pg_ctl logging is worthwhile. I have updated the initial patch with the following: (i) the message got changed to mention that this is a shutdown checkpoint, (ii) the end of the shutdown checkpoint is logged as well and (iii) if normal clients are connected during smart shutdown, a warning is logged. I'll attach it to the next commitfest and see whether anybody likes it. Michael -- Michael Banck Projektleiter / Berater Tel.: +49 (2161) 4643-171 Fax: +49 (2161) 4643-100 Email: michael.banck@credativ.de credativ GmbH, HRB Mönchengladbach 12080 USt-ID-Nummer: DE204566209 Hohenzollernstr. 133, 41061 Mönchengladbach Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer
В списке pgsql-hackers по дате отправления