Re: [HACKERS] Why does logical replication launcher exit with exitcode 1?
От
Gavin Flower
Тема
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1?
Дата
Msg-id
c3a7bc6e-1b19-afe6-9a40-54bdf214ae4c@archidevsys.co.nz
Ответ на
Список
Дерево обсуждения
[HACKERS] Why does logical replication launcher exit with exit code 1? Thomas Munro <thomas.munro@enterprisedb.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Andres Freund <andres@anarazel.de>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Gavin Flower <GavinFlower@archidevsys.co.nz>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Andres Freund <andres@anarazel.de>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Andres Freund <andres@anarazel.de>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Thomas Munro <thomas.munro@enterprisedb.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Andres Freund <andres@anarazel.de>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Thomas Munro <thomas.munro@enterprisedb.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Thomas Munro <thomas.munro@enterprisedb.com>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Andres Freund <andres@anarazel.de>
Re: [HACKERS] Why does logical replication launcher exit with exit code 1? Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Why does logical replication launcher exit with exitcode 1? Andres Freund <andres@anarazel.de>
On 02/08/17 11:03, Andres Freund wrote: > Hi, > > On 2017-08-02 10:58:32 +1200, Thomas Munro wrote: >> When I shut down a cluster that isn't using logical replication, it >> always logs a line like the following. So do the build farm members I >> looked at. I didn't see anything about this in the open items list -- >> isn't it a bug? >> >> 2017-08-02 10:39:25.007 NZST [34781] LOG: worker process: logical >> replication launcher (PID 34788) exited with exit code 1 > Exit code 0 signals that a worker should be restarted. Therefore > graceful exit can't really use that. I think a) we really need to > improve bgworker infrastructure around that b) shows the limit of using > bgworkers for this kinda thing - we should probably have a more bgworker > like infrastructure for internal workers. > > - Andres > > Returning zero to indicate success is a holdover to the time computers could only run one program at a time. At the end of the code there was a jump table of 4 byte entries. The first entry with a displacement of zero was the location to jump to for a normal exit, subsequent entries where for various error conditions. This why often return codes where in positive multiples of 4, since we don't use jump tables now - more & more people are using any integers they want. So apart from convention, returning zero is no longer held to be a sacred to indicate something exited okay. In fact since, zero could simply mean a value was not explicitly assigned, hence it is actually a very dangerous value to be used to indicate success! Cheers, Gavin
В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Andres Freund
Дата: