pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make archiver's SIGQUIT handler exit via _exit().
7+ messages / 1 participants
[nested] [flat]

* pgsql: Make archiver's SIGQUIT handler exit via _exit().
@ 2020-09-09 19:33  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-09-09 19:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/35e59398abbb562f1e831af206f1d1cc8c3cb7db

Modified Files
--------------
src/backend/postmaster/pgarch.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make archiver's SIGQUIT handler exit via _exit().
@ 2020-09-09 19:33  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-09-09 19:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/95cd8902e62d5ff508be7430ecfce87b3b3475f7

Modified Files
--------------
src/backend/postmaster/pgarch.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make archiver's SIGQUIT handler exit via _exit().
@ 2020-09-09 19:33  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-09-09 19:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/67dde49a3ddb263cee5b8fadbd8519302f603392

Modified Files
--------------
src/backend/postmaster/pgarch.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make archiver's SIGQUIT handler exit via _exit().
@ 2020-09-09 19:33  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-09-09 19:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/581855b6ae2309131ab9301f5155294b770ff8b1

Modified Files
--------------
src/backend/postmaster/pgarch.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make archiver's SIGQUIT handler exit via _exit().
@ 2020-09-09 19:33  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-09-09 19:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b2eaddd9b00acad80d634ec671235a080269bd72

Modified Files
--------------
src/backend/postmaster/pgarch.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make archiver's SIGQUIT handler exit via _exit().
@ 2020-09-09 19:33  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-09-09 19:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bedadc73220f7b09f29a4741dccd143a21a08dda

Modified Files
--------------
src/backend/postmaster/pgarch.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Make archiver's SIGQUIT handler exit via _exit().
@ 2020-09-09 19:33  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-09-09 19:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d038c6c6318b1959640a5a4b0f25cd577ebffbdf

Modified Files
--------------
src/backend/postmaster/pgarch.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-09-09 19:33 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 19:33 pgsql: Make archiver's SIGQUIT handler exit via _exit(). Tom Lane <tgl@sss.pgh.pa.us>
2020-09-09 19:33 pgsql: Make archiver's SIGQUIT handler exit via _exit(). Tom Lane <tgl@sss.pgh.pa.us>
2020-09-09 19:33 pgsql: Make archiver's SIGQUIT handler exit via _exit(). Tom Lane <tgl@sss.pgh.pa.us>
2020-09-09 19:33 pgsql: Make archiver's SIGQUIT handler exit via _exit(). Tom Lane <tgl@sss.pgh.pa.us>
2020-09-09 19:33 pgsql: Make archiver's SIGQUIT handler exit via _exit(). Tom Lane <tgl@sss.pgh.pa.us>
2020-09-09 19:33 pgsql: Make archiver's SIGQUIT handler exit via _exit(). Tom Lane <tgl@sss.pgh.pa.us>
2020-09-09 19:33 pgsql: Make archiver's SIGQUIT handler exit via _exit(). Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox