On Wed, Feb 19, 2025 at 10:43 AM Ron Johnson <ronljohnsonjr@xxxxxxxxx> wrote:
On Wed, Feb 19, 2025 at 10:00 AM Laurenz Albe <laurenz.albe@xxxxxxxxxxx> wrote:
No, that message is from a cancel request, like when you interrupt your
currently running query with Ctrl+C in "psql" or invoke pg_cancel_backend().
PostgreSQL doesn't do that by itself.The Linux oom killer? I don't remember the exact error message that PG gives to the user, but ISTR that it's "user request”. Had to search through /var/log/messages to see that oomkiller was the culprit.
OOM killer kills a process with sig 9. This reboots the entire cluster, and you would get some variant of "server closed the connection unexpectedly" or "terminating connection because of crash of another server process". So not a "user request".
Most likely some client (or client library) has an internal timer and cancels its own query after a certain amount of time.
I know that JDBC's setQueryTimeout operates this way, it sets a client side timeout which then kicks in to cancel the query by "user request".
The server load caused by an export could cause the other queries to run long enough for this logic to kick in, when they otherwise would not.
Cheers,
Jeff