Thread: BUG #16365: recieve smart shutdown after system start
The following bug has been logged on the website: Bug reference: 16365 Logged by: Roman Pivnitskiy Email address: prd87@mail.ru PostgreSQL version: 9.5.7 Operating system: Debian GNU/Linux 8.8 (jessie) Description: Hello. On some servers, we began to encounter the "strange" behavior of postgresql. When shutting down the server at the command of UPS (shutdown now). The next time you turn on postgresql, it gets smart shutdown immediately at startup In logs pg when server shutdown 2020-04-15 05:26:48 MSK [936]: [4-1] db=,user=,app=,client= LOG: received fast shutdown request 2020-04-15 05:26:48 MSK [936]: [5-1] db=,user=,app=,client= LOG: aborting any active transactions 2020-04-15 05:26:48 MSK [1338]: [2-1] db=,user=,app=,client= LOG: autovacuum launcher shutting down 2020-04-15 05:26:53 MSK [1335]: [7664-1] db=,user=,app=,client= LOG: checkpoint complete: wrote 13604 buffers (23.6%); 0 transaction log file(s) added, 0 removed, 0 recycled; write=472.958 s, sync=2.984 s, total=476.084 s; sync files=251, longest=1.098 s, average=0.011 s; distance=125092 kB, estimate=203540 kB 2020-04-15 05:26:53 MSK [1335]: [7665-1] db=,user=,app=,client= LOG: shutting down 2020-04-15 05:26:54 MSK [1335]: [7666-1] db=,user=,app=,client= LOG: checkpoint starting: shutdown immediate 2020-04-15 05:26:54 MSK [1335]: [7667-1] db=,user=,app=,client= LOG: checkpoint complete: wrote 79 buffers (0.1%); 0 transaction log file(s) added, 8 removed, 0 recycled; write=0.001 s, sync=0.393 s, total=0.552 s; sync files=18, longest=0.104 s, average=0.021 s; distance=15863 kB, estimate=184772 kB 2020-04-15 05:26:54 MSK [1335]: [7668-1] db=,user=,app=,client= LOG: database system is shut down after power on and start OS 2020-04-15 07:49:08 MSK [947]: [3-1] db=,user=,app=,client= LOG: received smart shutdown request 2020-04-15 07:49:08 MSK [1524]: [1-1] db=,user=,app=,client= LOG: database system was shut down at 2020-04-15 05:26:54 MSK 2020-04-15 07:49:15 MSK [1524]: [2-1] db=,user=,app=,client= LOG: MultiXact member wraparound protections are now enabled 2020-04-15 07:49:15 MSK [2398]: [1-1] db=,user=,app=,client= LOG: shutting down 2020-04-15 07:49:16 MSK [2398]: [2-1] db=,user=,app=,client= LOG: checkpoint starting: shutdown immediate 2020-04-15 07:49:16 MSK [2398]: [3-1] db=,user=,app=,client= LOG: checkpoint complete: wrote 0 buffers (0.0%); 0 transaction log file(s) added, 1 removed, 0 recycled; write=0.001 s, sync=0.000 s, total=0.779 s; sync files=0, longest=0.000 s, average=0.000 s; distance=16384 kB, estimate=16384 kB 2020-04-15 07:49:16 MSK [2398]: [4-1] db=,user=,app=,client= LOG: database system is shut down after manual start all ok (Even if you just restart the server in any way - auto start will happen correctly) 2020-04-15 09:27:49 MSK [21204]: [1-1] db=,user=,app=,client= LOG: database system was shut down at 2020-04-15 07:49:16 MSK 2020-04-15 09:27:49 MSK [21204]: [2-1] db=,user=,app=,client= LOG: MultiXact member wraparound protections are now enabled 2020-04-15 09:27:49 MSK [21208]: [1-1] db=,user=,app=,client= LOG: autovacuum launcher started 2020-04-15 09:27:49 MSK [21202]: [3-1] db=,user=,app=,client= LOG: database system is ready to accept connections 2020-04-15 09:27:50 MSK [21213]: [1-1] db=[unknown],user=[unknown],app=[unknown],client=[local] LOG: connection received: host=[local]
PG Bug reporting form <noreply@postgresql.org> writes: > On some servers, we began to encounter the "strange" behavior of > postgresql. > When shutting down the server at the command of UPS (shutdown now). The next > time you turn on postgresql, it gets smart shutdown immediately at startup Something is sending the server a SIGTERM signal. This is not a Postgres bug, it's something else in your system doing something it shouldn't. regards, tom lane
Thanks for the answer.
The only thing that united all the servers on which this behavior manifested was a shutdown on command from the UPS.
The UPS software has now changed. There was apcupsd, became chick-monitoring.
However, the behavior of postgresql persisted.
Completion does not apply to any other system processes. But it applies to all elements of the cluster (i.e., it was originally 1 - main, now there are 2 of them).
The only thing that united all the servers on which this behavior manifested was a shutdown on command from the UPS.
The UPS software has now changed. There was apcupsd, became chick-monitoring.
However, the behavior of postgresql persisted.
Completion does not apply to any other system processes. But it applies to all elements of the cluster (i.e., it was originally 1 - main, now there are 2 of them).
Среда, 15 апреля 2020, 17:53 +04:00 от Tom Lane <tgl@sss.pgh.pa.us>:
PG Bug reporting form <noreply@postgresql.org> writes:> On some servers, we began to encounter the "strange" behavior of
> postgresql.
> When shutting down the server at the command of UPS (shutdown now). The next
> time you turn on postgresql, it gets smart shutdown immediately at startup
Something is sending the server a SIGTERM signal. This is not a
Postgres bug, it's something else in your system doing something
it shouldn't.
regards, tom lane
С уважением.