Re: Unhappy thoughts about pg_dump and objects inherited from template1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unhappy thoughts about pg_dump and objects inherited from template1
Date
Msg-id 5378.973213953@sss.pgh.pa.us
Whole thread Raw
In response to Unhappy thoughts about pg_dump and objects inherited from template1  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unhappy thoughts about pg_dump and objects inherited from template1
List pgsql-hackers
Philip Warner <pjw@rhyme.com.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


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: Re: [COMMITTERS] pgsql/contrib/pg_dumpaccounts (Makefile README pg_dumpaccounts.sh)
Next
From: Philip Warner
Date:
Subject: Re: Unhappy thoughts about pg_dump and objects inherited from template1