Re: old synchronized scan patch - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: old synchronized scan patch
Date
Msg-id 45754C10.7030101@enterprisedb.com
Whole thread Raw
In response to Re: old synchronized scan patch  (Hannu Krosing <hannu@skype.net>)
Responses Re: old synchronized scan patch
Re: old synchronized scan patch
List pgsql-hackers
Hannu Krosing wrote:
> Ühel kenal päeval, E, 2006-12-04 kell 21:46, kirjutas Tom Lane:
>> Jeff Davis <pgsql@j-davis.com> writes:
>>> Since I am not storing any pointers, and since the information is only
>>> really a hint, I don't need to do any locking on that page.
>> If you think that, you need not bother to submit the patch.  (Hint:
>> as soon as you consider more than one table at a time, it doesn't work,
>> even ignoring the question of inconsistent reads.)
> 
> Why does it not work ?
> 
> Are you suggesting, that another backend can somegow see only some bits
> of page number being written ?
> 
> What problems do you see in multiple table case ?

You need to manage adding and removing relations from the shared memory 
structure. Which typically needs locking.

Assuming that relations are added or removed relatively seldom, you 
might get away with a table of (Oid, BlockNumber) pairs, working around 
the fact that the table might get messed up every now and then, and when 
it does, you'll lose the benefits until it gets corrected. But it seems 
really messy to me.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: old synchronized scan patch
Next
From: Hannu Krosing
Date:
Subject: Re: old synchronized scan patch