OID/XID allocation (was Re: is PG able to handle a >500 GB Database?) - Mailing list pgsql-general

From Tom Lane
Subject OID/XID allocation (was Re: is PG able to handle a >500 GB Database?)
Date
Msg-id 14627.980204737@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: is PG able to handle a >500 GB Database?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: OID/XID allocation (was Re: is PG able to handle a >500 GB Database?)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: OID/XID allocation (was Re: is PG able to handle a >500 GB Database?)  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> What about pre-fetching of OID's.  Does that still happen for every
> backend?

Only ones that actually allocate some OIDs, I think.

> What about XID's?

XIDs are wasted on a postmaster restart, but not per-backend, because
they are cached in shared memory instead of locally.  I've been thinking
about changing the code so that OIDs are allocated in the same fashion.
That would mean an extra spinlock grab per OID allocation, but so what?
We grab several spinlocks per row creation already.  And we could
increase the number of OIDs allocated per pg_variable file update,
which would save some time.

Haven't got round to it yet though, and I'm not sure but what Vadim
might be planning to throw out all that code anyway ...

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: is PG able to handle a >500 GB Database?
Next
From: "Tim Barnard"
Date:
Subject: Data entry screen building utilities