Re: ResourceOwner refactoring
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Aleksander Alekseev <aleksander@timescale.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Julien Rouhaud <rjuju123@gmail.com>, Robert Haas <robertmhaas@gmail.com>,
Peter Eisentraut <peter@eisentraut.org>, Andres Freund <andres@anarazel.de>
Date: 2024-06-05T13:58:45Z
Lists: pgsql-hackers
Attachments
- 0001-Make-RelationFlushRelation-work-without-ResourceOwne.patch (text/x-patch) patch 0001
On 04/06/2024 01:49, Heikki Linnakangas wrote: > A straightforward fix is to modify RelationFlushRelation() so that if > !IsTransactionState(), it just marks the entry as invalid instead of > calling RelationClearRelation(). That's what RelationClearRelation() > would do anyway, if it didn't hit the assertion first. Here's a patch with that straightforward fix. Your test case hit the "rd_createSubid != InvalidSubTransactionId" case, I expanded it to also cover the "rd_firstRelfilelocatorSubid != InvalidSubTransactionId" case. Barring objections, I'll commit this later today or tomorrow. Thanks for the report! I started a new thread with the bigger refactorings I had in mind: https://www.postgresql.org/message-id/9c9e8908-7b3e-4ce7-85a8-00c0e165a3d6%40iki.fi -- Heikki Linnakangas Neon (https://neon.tech)
Commits
-
Make RelationFlushRelation() work without ResourceOwner during abort
- e6cd85772647 17.0 landed
-
Fix bug in bulk extending temp relation after failure
- d212957254de 17.0 landed
-
Add missing PGDLLIMPORT markings
- c6b86eaa55ff 17.0 landed
-
Add test_dsa module.
- 325f54033e59 17.0 landed
-
Clear CurrentResourceOwner earlier in CommitTransaction.
- c21e6e2fd48c 17.0 landed
-
Fix dsa.c with different resource owners.
- a8b330ffb6f7 17.0 landed
-
Fix bug in the new ResourceOwner implementation.
- 8f4a1ab471e6 17.0 landed
-
Change pgcrypto to use the new ResourceOwner mechanism.
- cd694f60dc97 17.0 landed
-
Use a faster hash function in resource owners.
- 954e43564d99 17.0 landed
-
Make ResourceOwners more easily extensible.
- b8bff07daa85 17.0 landed
-
Move a few ResourceOwnerEnlarge() calls for safety and clarity.
- b70c2143bbbe 17.0 landed