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

Re: relation ### modified while in use

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: relation ### modified while in use
Date: 2000-11-02 17:20:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> Do we have a conclusion about this thread ?
> If no,how about changing heap_open(r) so that they allocate
> Relation descriptors after acquiring a lock on the table ?
> We would use LockRelation() no longer.

That won't do by itself, because that will open us up to failures when
a relcache invalidation arrives mid-transaction and we don't happen to
have the relation open at the time.  We could still have parse/plan
results that depend on the old relation definition.

Really we need to fix things so that a lock is held from first use to
end of transaction, independently of heap_open/heap_close.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2000-11-02 17:24:52
Subject: Re: LIMIT in DECLARE CURSOR: request for comments
Previous:From: Denis PerchineDate: 2000-11-02 16:48:41
Subject: Re: CommandCounterIncrement

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