At 23:48 14/11/00 -0500, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.au> writes:
>>> Given the present backend coding, all the DBs in an installation will
>>> have the same lastsysoid as template0 anyway, barring manual
>>> intervention.
>
>> Not the way the current 'CREATE DATABASE' code works - remember the changes
>> to set the OID at create time? AFAICT, that's still there.
>
>Look again. lastsysoid is now inherited from the database being cloned.
It looks to me like that was the intent of the code; but there is still:
tuple = heap_formtuple(pg_database_dsc, new_record, new_record_nulls);
tuple->t_data->t_oid = dboid; /* override heap_insert's OID
selection */
heap_insert(pg_database_rel, tuple);
which I think stuffs up everything, since dboid was allocated earlier in
the same call. But I agree, the code looks like it tries to do what you said.
I could have missed something, though.
>AFAICT all your subsequent comments are based on that
>misunderstanding...
Pretty much. Sorry. Is there a smiley for embarrasment?
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \| | --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/