Re: ResourceOwner refactoring

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
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>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: ResourceOwner refactoring
Date: 2024-06-05 13:58:45
Message-ID: ae623024-3ae7-44f5-bede-4faafdbb280a@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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)

Attachment Content-Type Size
0001-Make-RelationFlushRelation-work-without-ResourceOwne.patch text/x-patch 9.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2024-06-05 13:59:19 Re: Conflict Detection and Resolution
Previous Message Heikki Linnakangas 2024-06-05 13:56:33 Relcache refactoring