pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to log pg_terminate_backend() calls
2+ messages / 2 participants
[nested] [flat]
* How to log pg_terminate_backend() calls
@ 2020-01-14 12:01 Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2020-01-14 13:44 ` Re: How to log pg_terminate_backend() calls Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Zwettler Markus (OIZ) @ 2020-01-14 12:01 UTC (permalink / raw)
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
We see some "FATAL: terminating connection due to administrator command" error messages in the Postgres logfile.
We assume someone did pg_terminate_backend() calls.
How can we log such calls, especially who did the call?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: How to log pg_terminate_backend() calls
2020-01-14 12:01 How to log pg_terminate_backend() calls Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
@ 2020-01-14 13:44 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2020-01-14 13:44 UTC (permalink / raw)
To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
"Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch> writes:
> We see some "FATAL: terminating connection due to administrator command" error messages in the Postgres logfile.
> We assume someone did pg_terminate_backend() calls.
> How can we log such calls, especially who did the call?
There's no built-in facility for that, short of log_statement = all.
You could try making a wrapper function: rename pg_terminate_backend
to something else and then make a plpgsql equivalent that issues
RAISE LOG and then calls the renamed function.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-01-14 13:44 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 12:01 How to log pg_terminate_backend() calls Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
2020-01-14 13:44 ` 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