Re: Hot standby and b-tree killed items

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot standby and b-tree killed items
Date: 2008-12-20 07:25:27
Message-ID: 494C9DE7.1060505@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> Gregory Stark wrote:
>> The question I had was whether your solution for btree pointers marked
>> dead
>> and later dropped from the index works when the user hasn't configured a
>> timeout and doesn't want standby queries killed.
>
> Yes, it's not any different from vacuum WAL records.

No wait, there is a nasty corner-case. When an index tuple is marked as
killed, no WAL record is written. Since there's now WAL record, it won't
be killed in the slave yet. But if we take a full-page image of that
page later for some other operation, the LP_DEAD flag is included in the
full-page image. If the flag sneaks into the slave without an explicit
WAL record like that, there's no latestRemovedXid for the slave to wait on.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey E. Koposov 2008-12-20 07:34:22 Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Previous Message Heikki Linnakangas 2008-12-20 07:21:15 Re: Hot standby and b-tree killed items