Re: ResourceOwner refactoring

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: ResourceOwner refactoring
Date: 2023-11-07 11:28:28
Message-ID: bf814230-4172-47ce-a47c-6212ee6d298e@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/11/2023 12:43, Peter Eisentraut wrote:
> It looks like this patch set needs a bit of surgery to adapt to the LLVM
> changes in 9dce22033d. The cfbot is reporting compiler warnings about
> this, and also some crashes, which might also be caused by this.

Updated patch set attached. I fixed those LLVM crashes, and reordered
the fields in the ResourceOwner struct per Andres' suggestion.

> I do like the updated APIs. (Maybe the repeated ".DebugPrint = NULL,
> /* default message is fine */" lines could be omitted?)
>
> I like that one can now easily change the elog(WARNING) in
> ResourceOwnerReleaseAll() to a PANIC or something to get automatic
> verification during testing. I wonder if we should make this the
> default if assertions are on? This would need some adjustments to
> src/test/modules/test_resowner because it would then fail.

Yeah, perhaps, but I'll leave that to possible a follow-up patch.

I feel pretty good about this overall. Barring objections or new cfbot
failures, I will commit this in the next few days.

--
Heikki Linnakangas
Neon (https://neon.tech)

Attachment Content-Type Size
v17-0001-Move-a-few-ResourceOwnerEnlarge-calls-for-safety.patch text/x-patch 9.8 KB
v17-0002-Make-resowners-more-easily-extensible.patch text/x-patch 158.9 KB
v17-0003-Use-a-faster-hash-function-in-resource-owners.patch text/x-patch 2.8 KB
v17-0004-Change-pgcrypto-to-use-the-new-ResourceOwner-mec.patch text/x-patch 7.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2023-11-07 11:38:18 Protocol question regarding Portal vs Cursor
Previous Message shveta malik 2023-11-07 11:25:05 Re: Synchronizing slots from primary to standby