Re: [GENERAL] ALTER TABLE transaction isolation problem

2013-09-03 Thread David Johnston
Tom Lane-2 wrote >> Why don't we rewrite tuples with their existing xid in such cases? >> The current state of affairs seem to me to be a pretty clear bug. > > No, it isn't --- the tuple is being modified by the ALTER command. > > regards, tom lane I'm not quite sure what

Re: [GENERAL] ALTER TABLE transaction isolation problem

2013-09-03 Thread Kevin Grittner
Kevin Grittner wrote: > Tom Lane wrote: >> Kevin Grittner writes: >>> Why don't we rewrite tuples with their existing xid in such >>> cases?  The current state of affairs seem to me to be a pretty >>> clear bug. >> >> No, it isn't --- the tuple is being modified by the ALTER >> command. > > If a

Re: [GENERAL] ALTER TABLE transaction isolation problem

2013-09-03 Thread Kevin Grittner
Tom Lane wrote: > Kevin Grittner writes: >> Why don't we rewrite tuples with their existing xid in such >> cases?  The current state of affairs seem to me to be a pretty >> clear bug. > > No, it isn't --- the tuple is being modified by the ALTER > command. If a REPEATABLE READ or SERIALIZABLE tr

Re: [GENERAL] ALTER TABLE transaction isolation problem

2013-09-03 Thread Tom Lane
Kevin Grittner writes: > Why don't we rewrite tuples with their existing xid in such cases? > The current state of affairs seem to me to be a pretty clear bug. No, it isn't --- the tuple is being modified by the ALTER command. regards, tom lane -- Sent via pgsql-gener

Re: [GENERAL] ALTER TABLE transaction isolation problem

2013-09-03 Thread David Johnston
Kevin Grittner-5 wrote >> [ Examples shows that both SERIALIZABLE and REPEATABLE READ >> transactions could see an empty table which was not empty as of >> the point the snapshot was taken.  For that matter, it was not >> empty at any later point, either. ] > > Why don't we rewrite tuples with the

Re: [GENERAL] ALTER TABLE transaction isolation problem

2013-09-03 Thread Kevin Grittner
DT wrote: > I'm reading code of ALTER TABLE, and I found when target table > needs rewrite, tuple inserted into new heap uses current > transaction's xid as xmin. That sure sounds wrong to me. > Does this behavior satisfy serializable isolation? I wrote some > test cases: > > [ Examples shows

Re: [GENERAL] ALTER TABLE transaction isolation problem

2013-09-02 Thread David Johnston
DT wrote > Hi, > > I'm reading code of ALTER TABLE, and I found when target table needs > rewrite, tuple inserted into new heap uses current transaction's xid as > xmin. Does this behavior satisfy serializable isolation? I wrote some test > cases: > CREATE TABLE t1(a INT);CREATE TABLE t2(a INT);

[GENERAL] ALTER TABLE transaction isolation problem

2013-09-02 Thread DT
Hi, I'm reading code of ALTER TABLE, and I found when target table needs rewrite, tuple inserted into new heap uses current transaction's xid as xmin. Does this behavior satisfy serializable isolation? I wrote some test cases: CREATE TABLE t1(a INT);CREATE TABLE t2(a INT);INSERT INTO t1 VALUES