Re: How does PostgreSQL recognise "deleted" tuples by using xmax ?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: ????????? <sheepjxx(at)gmail(dot)com>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How does PostgreSQL recognise "deleted" tuples by using xmax ?
Date: 2009-10-27 07:38:14
Message-ID: 20091027073813.GA22746@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 27, 2009 at 03:55:39PM +1100, ????????? wrote:
> How does PostgreSQL recognise "deleted" tuples by using xmax ?

xmax is the ID of the transaction that deleted the row. So if you are
in a transaction that sees that transaction as commited, it has been
deleted (from your point of view). If from your point of view that
transaction is aborted, it has not been deleted. If that transaction is
not finished yet, you have to wait.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raimon Fernandez 2009-10-27 08:02:47 Re: Implementing Frontend/Backend Protocol TCP/IP
Previous Message John R Pierce 2009-10-27 07:29:15 Re: Implementing Frontend/Backend Protocol TCP/IP