Re: ALTER TABLE transaction isolation problem

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: DT <kurt023(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: ALTER TABLE transaction isolation problem
Date: 2013-09-03 14:29:28
Message-ID: 1378218568.89965.YahooMailNeo@web162905.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

DT <kurt023(at)hotmail(dot)com> 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 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 their existing xid in such cases?
The current state of affairs seem to me to be a pretty clear bug.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2013-09-03 14:42:06 Re: ALTER TABLE transaction isolation problem
Previous Message Kevin Grittner 2013-09-03 14:12:54 Re: SSI and predicate locks - a non-trivial use case