From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(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>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: ResourceOwner refactoring |
Date: | 2023-11-12 22:16:50 |
Message-ID: | 009634e6-762f-4be4-b04a-aeb735ba7b11@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/11/2023 14:00, Alexander Lakhin wrote:
> 10.11.2023 17:26, Heikki Linnakangas wrote:
>>
>> I think that is surprising behavior from the DSA facility. When you make allocations with dsa_allocate() or just call
>> dsa_get_address() on an existing dsa_pointer, you wouldn't expect the current resource owner to matter. I think
>> dsa_create/attach() should store the current resource owner in the dsa_area, for use in subsequent operations on the
>> DSA, per attached patch (0002-Fix-dsa.c-with-different-resource-owners.patch).
>>
>
> With the patch 0002 applied, I'm observing another anomaly:
Ok, so the ownership of a dsa was still muddled :-(. Attached is a new
version that goes a little further. It replaces the whole
'mapping_pinned' flag in dsa_area with the 'resowner'. When a mapping is
pinned, it means that 'resowner == NULL'. This is now similar to how the
resowner field and pinning works in dsm.c.
--
Heikki Linnakangas
Neon (https://neon.tech)
Attachment | Content-Type | Size |
---|---|---|
0001-Add-test_dsa-module.patch | text/x-patch | 8.8 KB |
0002-Fix-dsa.c-with-different-resource-owners.patch | text/x-patch | 5.0 KB |
0003-Clear-CurrentResourceOwner-earlier-in-CommitTransact.patch | text/x-patch | 1.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2023-11-12 23:08:57 | Re: ResourceOwner refactoring |
Previous Message | Kim Johan Andersson | 2023-11-12 20:30:33 | Re: [PATCH] Add support function for containment operators |