Skip site navigation (1) Skip section navigation (2)

Hot standby and b-tree killed items

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Hot standby and b-tree killed items
Date: 2008-12-19 08:49:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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 

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


pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-12-19 08:50:41
Subject: Re: Sync Rep: First Thoughts on Code
Previous:From: Asko OjaDate: 2008-12-19 08:13:21
Subject: Re: Summary: changes needed in function defaults behavior

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group