Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
Date
Msg-id 24280.1412403668@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
List pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 10/03/2014 07:08 AM, Kouhei Kaigai wrote:
>> What is the best way to solve the problem?

> How about creating a separate ResourceOwner for these buffer pins, and
> doing a wholesale ResourceOwnerRelease() on it when you're done?

That's a thought.  Another point is that if you can release the buffer
pins in reverse order of acquisition, the existing ResourceOwner code
works just fine.

I have a larger question though: how is it useful to transfer
raw contents of shared buffers to a GPU in the first place?
Surely you're not going to be putting tasks like tuple visibility
verification into the GPU.  So it seems like this whole thread is
based on a dubious architectural assumption.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_receivexlog and replication slots
Next
From: Michael Paquier
Date:
Subject: Re: [RFC] Incremental backup v2: add backup profile to base backup