Re: Accessing schema data in information schema - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Accessing schema data in information schema
Date
Msg-id 20499.1143066548@sss.pgh.pa.us
Whole thread Raw
In response to Re: Accessing schema data in information schema  (Hannu Krosing <hannu@skype.net>)
Responses Re: Accessing schema data in information schema  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
Hannu Krosing <hannu@skype.net> writes:
> Ühel kenal päeval, K, 2006-03-22 kell 16:11, kirjutas Tom Lane:
>> Yeah.  I've occasionally toyed with the idea that sequences should be
>> rows in a single catalog instead of independent tables as they are now.
>> This would make for a much smaller disk footprint (with consequent I/O
>> savings) and would solve problems like the one you have. 

> Would it not make page locking problems much worse with all get_next()'s
> competeing to update the same page? 

Well, there'd be at most about 80 sequences per page (ballpark estimate
remembering that we'd still want to store a sequence name) and the
reduction in demand for shared buffers might outweigh the increased
contention for any one buffer.  I haven't seen any examples where get_next
is the key source of contention anyhow.  A last point is that in simple
cases where the contention is all on one sequence, you're going to have
that problem anyway.

> At least unless you reserve one page for each sequence.

Which is exactly what I don't want.  But we could imagine padding the
tuples to achieve any particular tuples/page ratio we want, if 80 proves
to be uncomfortably many.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Accessing schema data in information schema
Next
From: Hannu Krosing
Date:
Subject: Re: Accessing schema data in information schema