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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Vadim Mikheev <vmikheev(at)sectorbase(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: OID/XID allocation (was Re: is PG able to handle a >500 GB Database?)
Date: 2001-01-22 23:59:42
Message-ID: 200101222359.SAA18029@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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.

Yes, I think the leak of 50 oids for every backend that asks for an OID
is really a waste. I can see this change buying us a few more years
without oid problems.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-01-23 00:02:13 Re: OID/XID allocation (was Re: is PG able to handle a >500 GB Database?)
Previous Message Alexander Jerusalem 2001-01-22 23:58:49 Re: [HACKERS] Re: postgres memory management