| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | Michael Banck <mbanck(at)gmx(dot)net> |
| Cc: | Ignat Remizov <ignat980(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM |
| Date: | 2025-12-05 07:38:16 |
| Message-ID: | CALdSSPhsEYaAgSG=1Utj2MOTgy3u2sp_QPr6sJthhACtRrF=0g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, 5 Dec 2025, 12:32 Michael Banck, <mbanck(at)gmx(dot)net> wrote:
> Hi,
>
> On Wed, Dec 03, 2025 at 11:29:09PM +0500, Kirill Reshke wrote:
> > On Wed, 3 Dec 2025 at 23:17, I wrote:
> > > (I did derive the exact example
> > > when postgresql immediately restarts after some SQL but im 100% there
> > > is such thing )
> >
> > select repeat('a',1024*1024*1023) from generate_series(1, 100);
>
> I get
>
> out of memory for query result
>
> I guess it depends on whether you have memory overcommit on or off,
> and/or whether you run in a container/Kubernetes. Or maybe it depends on
> something else.
>
> This denial of service is a different problem, and I agree that Postgres
> desperately needs a way to limit memory allocations per user (one can
> set work_mem as high as 1.999TB as regular user) and globally.
>
>
> Michael
>
The idea here is that you get OOM which will lead to restart.
Aslo you can change archive command to 'shutdown'.
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-12-05 07:41:41 | Re: Consistently use palloc_object() and palloc_array() |
| Previous Message | Michael Banck | 2025-12-05 07:32:58 | Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM |