Re: [PATCH] plpython function causes server panic
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Hao Zhang <zhrt1446384557@gmail.com>, Andres Freund <andres@anarazel.de>,
pgsql-hackers@lists.postgresql.org
Date: 2024-03-28T15:50:30Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > Hmm, I wonder if that's actually where the cycles are going. There's > an awful lot of separate function calls inside CommitSubTransaction(), > and in the common case, each one of them has to individually decide > that it doesn't need to do anything. Sure, they're all fast, but if > you have enough of them, it's still going to add up, at least a bit. > In that sense, the resource owner mechanism seems like it should, or > at least could, be better. Yeah, I was thinking about that too. The normal case is that you don't hold any releasable resources except locks when arriving at CommitSubTransaction --- if you do, it's a bug and we're going to print leak warnings. Seems like maybe it'd be worth trying to have a fast path for that case. (Also, given that we probably do need to release locks right away, this point invalidates my earlier idea of postponing the work.) > But I haven't done any benchmarking of this area in a long time. Ditto. regards, tom lane
Commits
-
Allow "internal" subtransactions in parallel mode.
- 0075d78947e3 17.0 landed
-
Tighten up application of parallel mode checks.
- 94b4f7e2a635 9.6.0 cited