Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> This is exactly the same argument as not being able to overwrite cmin.
> Basically the phantom xid's are a shorthand for saying the tuple was
> created by xid1 and deleted by xid2, both part of the same main
> A cursor looking at the rows has to recognize the xid is a phantom (via
> pg_subtrans) and look up the creation xid.
You still don't see the point. Consider
DECLARE CURSOR c1 FOR SELECT * FROM a ...;
INSERT INTO a VALUES(...); -- call this row x
DECLARE CURSOR c2 FOR SELECT * FROM a ...;
DELETE FROM a WHERE ...; -- assume this deletes row x
FETCH FROM c1; -- must NOT see row x
FETCH FROM c2; -- must see row x
AFAICS your proposal does not support this. The two cursors' snapshots
will differ only in the recorded current-cid for the outer transaction.
If the subtrans has overwritten xmin/cmin, there is no way to make that
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Shridhar Daithankar||Date: 2004-06-02 13:53:35|
|Subject: Re: Converting postgresql.conf parameters to kilobytes|
|Previous:||From: Tom Lane||Date: 2004-06-02 13:38:12|
|Subject: Re: ACLs versus ALTER OWNER |