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

Re: Non-transactional pg_class, try 2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Non-transactional pg_class, try 2
Date: 2006-06-12 01:31:32
Message-ID: 28994.1150075892@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>>> Other two caveats are: 
>>> 1. During bootstrap, RelationBuildLocalRelation creates nailed relations
>>> with hardcoded TID=(0,1).
>> 
>> This seems dangerous; can't you set it to InvalidItemPointer instead?
>> If it's not used before fixed, this doesn't matter, and if someone
>> *does* try to use it, that will catch the problem.

> Doesn't work because the bootstrap system actually _writes_ there :-(  A
> workaround could be to disable writing in bootstrapping mode, and store
> InvalidItemPointer.  (Actually storing InvalidItemPointer was the first
> thing I did, but it crashed on bootstrap.)

Or, set it to (0,1) and reserve that TID as a dummy entry.  What I'm
afraid of here is scribbling on some other relation's entry.  I'd like
to see some defense against that, don't much care what.

We do plenty of disable-this-in-bootstrap-mode checks, so one more
doesn't seem like a problem; so the first solution may be better.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2006-06-12 01:32:13
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(),
Previous:From: Alvaro HerreraDate: 2006-06-12 01:26:19
Subject: Re: Non-transactional pg_class, try 2

pgsql-patches by date

Next:From: Qingqing ZhouDate: 2006-06-12 05:56:48
Subject: minor fix of elevel in fd.c
Previous:From: Alvaro HerreraDate: 2006-06-12 01:26:19
Subject: Re: Non-transactional pg_class, try 2

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