From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: postmaster: Commonalize FatalError paths |
Date: | 2025-01-24 22:42:08 |
Message-ID: | E1tbSNL-003L6v-Qw@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
postmaster: Commonalize FatalError paths
This includes some behavioral changes:
- Previously PM_WAIT_XLOG_ARCHIVAL wasn't handled in HandleFatalError(), that
doesn't seem quite right.
- Previously a fatal error in PM_WAIT_XLOG_SHUTDOWN lead to jumping back to
PM_WAIT_BACKENDS, no we go to PM_WAIT_DEAD_END. Jumping backwards doesn't
seem quite right and we didn't do so when checkpointer failed to fork during
a shutdown.
- Previously a checkpointer fork failure didn't call SetQuitSignalReason(),
which would lead to quickdie() reporting
"terminating connection because of unexpected SIGQUIT signal"
which seems even worse than the PMQUIT_FOR_CRASH message. If I saw that in
the log I'd suspect somebody outside of postgres sent SIGQUITs
Reviewed-by: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Discussion: https://postgr.es/m/kgng5nrvnlv335evmsuvpnh354rw7qyazl73kdysev2cr2v5zu@m3cfzxicm5kp
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/463a2ebd9fda4fa94833838d0a372f7fd53b5b8a
Modified Files
--------------
src/backend/postmaster/postmaster.c | 74 +++++++++++++++++++++++++++++--------
1 file changed, 58 insertions(+), 16 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2025-01-24 22:59:27 | pgsql: Add SQL function CASEFOLD(). |
Previous Message | Tom Lane | 2025-01-24 18:20:51 | pgsql: Make jsonb casts to scalar types translate JSON null to SQL NULL |