Re: Hot Standby, deferred conflict resolution for cleanup records (v2)

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hot Standby, deferred conflict resolution for cleanup records (v2)
Date: 2009-12-14 07:21:40
Message-ID: 4B25E784.8080505@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark wrote:
> On Sat, Dec 12, 2009 at 3:06 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> Anyone acquiring a lock on a table should check the latestRemovedXid for
>> the table and abort if their xmin is too old. This prevents new lockers
>> from accessing a cleaned relation immediately after we decide to abort
>> anyone looking at that table. (Anyone queuing for the existing locks
>> would be caught by this).
>
> I fear given HOT pruning that this could mean no query can even get
> started against a busy table. It seems like you would have to start
> your transaction several times until you manage to get a lock on the
> busy table soon enough after taking the snapshot to not have missed
> any cleanups in the table. Or have I missed something that protects
> against that?

I presume max_standby_delay would still apply, and we would only use the
new mechanism where we would otherwise outright kill a query.

> The bigger problem with this is that I don't see any way to tune this
> to have a safe replica.

Yeah, it's very opportunistic.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Scott Bailey 2009-12-14 07:49:53 Range types
Previous Message KaiGai Kohei 2009-12-14 06:43:37 Re: Row-Level Security