pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jochem van Dieten <jochemd@oli.tudelft.nl>
Cc: Manfred Koizar <mkoi-pg@aon.at>
Cc: pgsql-performance@postgresql.org
Subject: Re: planner/optimizer question
Date: Sat, 01 May 2004 12:21:28 -0400
Message-ID: <14614.1083428488@sss.pgh.pa.us> (raw)
In-Reply-To: <4093876C.2060409@oli.tudelft.nl>
References: <pvc290584alms4s6hurvsh5ra09ki7se1s@email.aon.at>
	<409290F0.10509@oli.tudelft.nl>
	<toe590tgu39ilahg3p1os2mjlgf4iss582@email.aon.at>
	<8881.1083374379@sss.pgh.pa.us>
	<4093876C.2060409@oli.tudelft.nl>

Jochem van Dieten <jochemd@oli.tudelft.nl> writes:
> The moment the heap tuple is updated/deleted the visible-to-all 
> flag needs to be set to false again in all indexes. This is 
> critical,

Exactly.  This gets you out of the hint-bit semantics and into a ton
of interesting problems, such as race conditions.  (Process A determines
that tuple X is visible-to-all, and goes to update the index tuple.
Before it can reacquire lock on the index page, process B updates the
heap tuple and visits the index to clear the flag bit.  Once A obtains
lock it will set the flag bit.  Oops.)

Basically what you are buying into with such a thing is multiple copies
of critical state.  It may be only one bit rather than several words,
but updating it is no less painful than if it were a full copy of the
tuple's commit status.

			regards, tom lane



view thread (37+ messages)  latest in thread

Message-ID: <14614.1083428488@sss.pgh.pa.us>
Permalink:  ../14614.1083428488@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14614.1083428488@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jochemd@oli.tudelft.nl, mkoi-pg@aon.at
  Subject: Re: planner/optimizer question
  In-Reply-To: <14614.1083428488@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox