Re: Hot standby and b-tree killed items

From: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hot standby and b-tree killed items
Date: 2008-12-19 14:22:59
Message-ID: 2F3DEB6C-88E6-4F3A-9F08-C650A228DC8D@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm confused shouldn't read-only transactions on the slave just be
hacked to not set any hint bits including lp_delete?

--
Greg

On 19 Dec 2008, at 03:49, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com
> wrote:

> Whenever a B-tree index scan fetches a heap tuple that turns out to
> be dead, the B-tree item is marked as killed by calling
> _bt_killitems. When the page gets full, all the killed items are
> removed by calling _bt_vacuum_one_page.
>
> That's a problem for hot standby. If any of the killed b-tree items
> point to a tuple that is still visible to a running read-only
> transaction, we have the same situation as with vacuum, and have to
> either wait for the read-only transaction to finish before applying
> the WAL record or kill the transaction.
>
> It looks like there's some cosmetic changes related to that in the
> patch, the signature of _bt_delitems is modified, but there's no
> actual changes that would handle that situation. I didn't see it on
> the TODO on the hot standby wiki either. Am I missing something, or
> the patch?
>
> --
> Heikki Linnakangas
> EnterpriseDB http://www.enterprisedb.com
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Grzegorz Jaskiewicz 2008-12-19 14:51:25 Re: possible bug in 8.4
Previous Message Andrew Dunstan 2008-12-19 14:15:55 Re: stat() vs cygwin