pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_class.oid at 4B
4+ messages / 4 participants
[nested] [flat]

* pg_class.oid at 4B
@ 2021-10-20 20:29  Radoslav Nedyalkov <rnedyalkov@gmail.com>
  0 siblings, 3 replies; 4+ messages in thread

From: Radoslav Nedyalkov @ 2021-10-20 20:29 UTC (permalink / raw)
  To: pgsql-general

Hello all,
We have a busy database that has oid increasing with 50-100M  per month.
There is no oid type across user attributes anywhere nor user tables with
oids;
Not sure where this generation comes from. If you can hint me, it would be
great.
Also what happens when pg_class.oid reaches 4B.
pg_class itself is ~40K.

Thank you very much,
Rado

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_class.oid at 4B
@ 2021-10-20 20:39  David G. Johnston <david.g.johnston@gmail.com>
  parent: Radoslav Nedyalkov <rnedyalkov@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: David G. Johnston @ 2021-10-20 20:39 UTC (permalink / raw)
  To: Radoslav Nedyalkov <rnedyalkov@gmail.com>; +Cc: pgsql-general

On Wednesday, October 20, 2021, Radoslav Nedyalkov <rnedyalkov@gmail.com>
wrote:

> Hello all,
> We have a busy database that has oid increasing with 50-100M  per month.
> There is no oid type across user attributes anywhere nor user tables with
> oids;
> Not sure where this generation comes from. If you can hint me, it would be
> great.
>
>
Large objects?

Log ddl statements and see what kinds of create commands are produced in
volume?

David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_class.oid at 4B
@ 2021-10-20 21:20  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Radoslav Nedyalkov <rnedyalkov@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2021-10-20 21:20 UTC (permalink / raw)
  To: Radoslav Nedyalkov <rnedyalkov@gmail.com>; +Cc: pgsql-general

Radoslav Nedyalkov <rnedyalkov@gmail.com> writes:
> We have a busy database that has oid increasing with 50-100M  per month.
> There is no oid type across user attributes anywhere nor user tables with
> oids;
> Not sure where this generation comes from. If you can hint me, it would be
> great.

Lots of short-lived temporary tables, maybe?

> Also what happens when pg_class.oid reaches 4B.

Nothing.  The counter will wrap around and you won't notice a thing.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_class.oid at 4B
@ 2021-10-21 05:53  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Radoslav Nedyalkov <rnedyalkov@gmail.com>
  2 siblings, 0 replies; 4+ messages in thread

From: Laurenz Albe @ 2021-10-21 05:53 UTC (permalink / raw)
  To: Radoslav Nedyalkov <rnedyalkov@gmail.com>; pgsql-general

On Wed, 2021-10-20 at 23:29 +0300, Radoslav Nedyalkov wrote:
> We have a busy database that has oid increasing with 50-100M  per month.
> There is no oid type across user attributes anywhere nor user tables with oids;
> Not sure where this generation comes from. If you can hint me, it would be great.
> Also what happens when pg_class.oid reaches 4B.
> pg_class itself is ~40K.

Hard to say, perhaps you are creating lots of temporary tables (watch out
for pg_attribute bloat!).  The OID counter will simply wrap around, but there
will be no duplicate OIDs in pg_class.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2021-10-21 05:53 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 20:29 pg_class.oid at 4B Radoslav Nedyalkov <rnedyalkov@gmail.com>
2021-10-20 20:39 ` David G. Johnston <david.g.johnston@gmail.com>
2021-10-20 21:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-10-21 05:53 ` Laurenz Albe <laurenz.albe@cybertec.at>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox