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

Re: Inadequate thought about buffer locking during hot standby replay

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Inadequate thought about buffer locking during hot standby replay
Date: 2012-11-12 14:23:45
Message-ID: CA+Tgmob6NS=jhz=y6NYnfqmfW5y6ten5YXi3WMOc9v3vwgkMCA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sun, Nov 11, 2012 at 6:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I already pointed out the inconsistency in heap_xlog_freeze about
> whether a cleanup lock is needed.  As is, this patch uses a cleanup
> lock, but I suspect that a regular lock is sufficient --- comments?

Well, according to storage/buffer/README:

1. To scan a page for tuples, one must hold a pin and either shared or
exclusive content lock.  To examine the commit status (XIDs and status bits)
of a tuple in a shared buffer, one must likewise hold a pin and either shared
or exclusive lock.

That does indeed make it sound like an x-lock is enough.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-11-12 14:36:18
Subject: Re: Inadequate thought about buffer locking during hot standby replay
Previous:From: Tom LaneDate: 2012-11-12 14:17:01
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL

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