Re: Leader backend hang on IPC/ParallelFinish when LWLock held at parallel query start

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Francesco Degrassi <francesco(dot)degrassi(at)optionfactory(dot)net>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Leader backend hang on IPC/ParallelFinish when LWLock held at parallel query start
Date: 2024-09-18 05:45:31
Message-ID: 1748003.1726638331@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Noah Misch <noah(at)leadboat(dot)com> writes:
> What if we just ignored the plancache when uninterruptible? The new planner
> check would then suffice.

Only if you believe that parallel-query is the only problem,
which is something I seriously doubt. I fear that the
committed patch is just a band-aid over one symptom of the
general problem that we can't permit arbitrary operations
to be invoked from a btree comparison function. It's late
here so I'm not sufficiently awake to think of examples,
but I'm sure there are some.

However ... clearly a maliciously-coded btree support function can
do arbitrarily bad stuff. We restrict creation of opclasses to
superusers for exactly that reason. If our ambitions are only
to prevent support functions from *accidentally* causing problems,
is disabling parallel query enough? I'm still pretty uncomfortable
about it, but it's less obviously insufficient than in the general
case.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-09-18 05:51:23 Re: INFORMATION_SCHEMA.routines column routine_definition does not show the source
Previous Message David G. Johnston 2024-09-18 05:42:53 INFORMATION_SCHEMA.routines column routine_definition does not show the source