Re: [HACKERS] Hot Standby b-tree delete records review

2010-11-09 Thread Simon Riggs
On Tue, 2010-11-09 at 13:34 +0200, Heikki Linnakangas wrote: (cleaning up my inbox, and bumped into this..) On 22.04.2010 12:31, Simon Riggs wrote: On Thu, 2010-04-22 at 12:18 +0300, Heikki Linnakangas wrote: Simon Riggs wrote: On Thu, 2010-04-22 at 11:56 +0300, Heikki Linnakangas wrote:

Re: [HACKERS] Hot Standby b-tree delete records review

2010-11-09 Thread Heikki Linnakangas
(cleaning up my inbox, and bumped into this..) On 22.04.2010 12:31, Simon Riggs wrote: On Thu, 2010-04-22 at 12:18 +0300, Heikki Linnakangas wrote: Simon Riggs wrote: On Thu, 2010-04-22 at 11:56 +0300, Heikki Linnakangas wrote: If none of the removed heap tuples were present anymore, we

[HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Heikki Linnakangas
btree_redo: case XLOG_BTREE_DELETE: /* * Btree delete records can conflict with standby queries. You * might think that vacuum records would conflict as well, but * we've handled that already. XLOG_HEAP2_CLEANUP_INFO records

Re: [HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Simon Riggs
On Thu, 2010-04-22 at 10:24 +0300, Heikki Linnakangas wrote: btree_redo: case XLOG_BTREE_DELETE: /* * Btree delete records can conflict with standby queries. You * might think that vacuum records would conflict as well, but *

Re: [HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Heikki Linnakangas
Simon Riggs wrote: On Thu, 2010-04-22 at 10:24 +0300, Heikki Linnakangas wrote: btree_redo: /* * Note that if all heap tuples were LP_DEAD then we will be * returning InvalidTransactionId here. This seems very unlikely * in practice. */ If none of the removed heap

Re: [HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Simon Riggs
On Thu, 2010-04-22 at 11:28 +0300, Heikki Linnakangas wrote: Simon Riggs wrote: On Thu, 2010-04-22 at 10:24 +0300, Heikki Linnakangas wrote: btree_redo: /* * Note that if all heap tuples were LP_DEAD then we will be * returning InvalidTransactionId here. This seems very unlikely

Re: [HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Heikki Linnakangas
Simon Riggs wrote: On Thu, 2010-04-22 at 11:28 +0300, Heikki Linnakangas wrote: Simon Riggs wrote: On Thu, 2010-04-22 at 10:24 +0300, Heikki Linnakangas wrote: btree_redo: /* * Note that if all heap tuples were LP_DEAD then we will be * returning InvalidTransactionId here. This

Re: [HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Simon Riggs
On Thu, 2010-04-22 at 11:56 +0300, Heikki Linnakangas wrote: If none of the removed heap tuples were present anymore, we currently return InvalidTransactionId, which kills/waits out all read-only queries. But if none of the tuples were present anymore, the read-only queries wouldn't have

Re: [HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Heikki Linnakangas
Simon Riggs wrote: On Thu, 2010-04-22 at 11:56 +0300, Heikki Linnakangas wrote: If none of the removed heap tuples were present anymore, we currently return InvalidTransactionId, which kills/waits out all read-only queries. But if none of the tuples were present anymore, the read-only

Re: [HACKERS] Hot Standby b-tree delete records review

2010-04-22 Thread Simon Riggs
On Thu, 2010-04-22 at 12:18 +0300, Heikki Linnakangas wrote: Simon Riggs wrote: On Thu, 2010-04-22 at 11:56 +0300, Heikki Linnakangas wrote: If none of the removed heap tuples were present anymore, we currently return InvalidTransactionId, which kills/waits out all read-only queries.