Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM
Michael Banck <mbanck@gmx.net>
From: Michael Banck <mbanck@gmx.net>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Ignat Remizov <ignat980@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-05T09:30:46Z
Lists: pgsql-hackers
Hi,
On Fri, Dec 05, 2025 at 12:38:16PM +0500, Kirill Reshke wrote:
> On Fri, 5 Dec 2025, 12:32 Michael Banck, <mbanck@gmx.net> wrote:
> The idea here is that you get OOM which will lead to restart.
Right, but you only get OOM if you have memory overcommit enabled (or
are running Postgres in a cgroupv2 container) was my point. Otherwise,
you just get an error:
postgres=# SET work_mem = '1.995TB';
SET
postgres=# select repeat('a',1024*1024*1023) from generate_series(1, 100);
out of memory for query result
postgres=# SELECT 1;
?column?
----------
1
(1 row)
> Aslo you can change archive command to 'shutdown'.
Yeah.
Michael