Skip site navigation (1) Skip section navigation (2)

Re: Unhappy thoughts about pg_dump and objects inherited from template1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Unhappy thoughts about pg_dump and objects inherited from template1
Date: 2000-11-03 01:12:33
Message-ID: 5378.973213953@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
>> 1. What if the inherited object is a table or a sequence?

> The only solution I can think of for this would be to use lastsysoid from
> template1; this is the value set when initdb runs.

How does that help?  It won't tell you anything about updated or deleted
rows, nor about sequence advances, nor ALTER FUNCTION changes.  You
could detect inserted rows, and that's about it.

>> 3. What if the OID counter wraps around?

> Can the code that wraps the OID restart it at 'select max(lastsysoid) from
> pg_database'? Is that too complex?

What if lastsysoid is MAXINT minus just a little?  Not very workable,
even if it were possible for the OID counter to work that way, which
I don't think it is (the OID allocator is way too low-level to go off
invoking arbitrary queries with safety).

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2000-11-03 01:13:00
Subject: Re: Re: [COMMITTERS] pgsql/contrib/pg_dumpaccounts (Makefile README pg_dumpaccounts.sh)
Previous:From: Vince VielhaberDate: 2000-11-03 01:11:53
Subject: Re: Re: [COMMITTERS] pgsql/contrib/pg_dumpaccounts (Makefile README pg_dumpaccounts.sh)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group