Re: OOM kill during planning - pg_terminate_backend is ignored

From: Floris Van Nee <florisvannee(at)Optiver(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: OOM kill during planning - pg_terminate_backend is ignored
Date: 2026-09-02 12:50:18
Message-ID: MRWPR09MB83572069158FFE1B01D20178CCB72@MRWPR09MB8357.eurprd09.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Andres,

Thanks for your reply.

> I think we'd need a separation between the function to start initiating a tree
> walk/mutation and the function called for every recursion level. Then we can
> do the CFI() in the "start a tree walk" function, without having to do it the
> expression_tree_walker_impl(), once per processed node.

It looks like query_or_expression_tree_walker_impl and
query_or_expression_tree_mutator_impl actually have this property of
only being called when starting a tree walk. Perhaps it's OK to add the
check for interrupts at the start of these two functions? I can create a
patch for this if this is an acceptable approach.

-Floris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-09-02 12:50:51 Re: Function scan FDW pushdown
Previous Message Vaibhav Dalvi 2026-09-02 12:39:40 Re: [PATCH] Add support for INSERT ... SET syntax