From: Simon Riggs <simon@2ndQuadrant.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Visibility map, partial vacuums
Date: Tue, 28 Oct 2008 17:30:24 +0000
Message-ID: <1225215024.3971.221.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <490745AF.2090602@enterprisedb.com>
References: <4905AE17.7090305@enterprisedb.com>
<1225193108.3971.154.camel@ebony.2ndQuadrant>
<49070C29.9090508@enterprisedb.com>
<1225203735.3971.167.camel@ebony.2ndQuadrant>
<490745AF.2090602@enterprisedb.com>
On Tue, 2008-10-28 at 19:02 +0200, Heikki Linnakangas wrote:
> Yes, but there's a problem with recently inserted tuples:
>
> 1. A query begins in the slave, taking a snapshot with xmax = 100. So
> the effects of anything more recent should not be seen.
> 2. Transaction 100 inserts a tuple in the master, and commits
> 3. A vacuum comes along. There's no other transactions running in the
> master. Vacuum sees that all tuples on the page, including the one just
> inserted, are visible to everyone, and sets PD_ALL_VISIBLE flag.
> 4. The change is replicated to the slave.
> 5. The query in the slave that began at step 1 looks at the page, sees
> that the PD_ALL_VISIBLE flag is set. Therefore it skips the visibility
> checks, and erroneously returns the inserted tuple.
Yep. I was thinking about FSM and row removal. So PD_ALL_VISIBLE must be
separately settable on the standby. Another reason why it should be able
to be set without a VACUUM - since there will never be one on standby.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
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-hackers@postgresql.org
Cc: simon@2ndQuadrant.com, heikki.linnakangas@enterprisedb.com
Subject: Re: Visibility map, partial vacuums
In-Reply-To: <1225215024.3971.221.camel@ebony.2ndQuadrant>
* 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