pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Noah Misch <noah@leadboat.com>
Cc: Nikolas Everett <nik9000@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Exhaustive list of what takes what locks
Date: Wed, 23 Feb 2011 12:59:31 -0500
Message-ID: <AANLkTin2QKROAP51xsf46Wc5xdev346UUmd_tpNmmY9P@mail.gmail.com> (raw)
In-Reply-To: <2316.1298482279@sss.pgh.pa.us>
References: <AANLkTiksaoSZ03m_jALCBwhfogZxNA5_wKo_3J6ydBfF@mail.gmail.com>
	<20110202052004.GA26098@tornado.gateway.2wire.net>
	<AANLkTikNzBfCQxsfed6qYTv0GrYZ8vM1wjwStjd8PwT=@mail.gmail.com>
	<20110223042108.GA27781@tornado.gateway.2wire.net>
	<AANLkTinf=fC9T8JJXsGMHDEggDNiXvj87opYfjO5huEq@mail.gmail.com>
	<2316.1298482279@sss.pgh.pa.us>

On Wed, Feb 23, 2011 at 12:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> ...but that begs the question of why DROP INDEX needs an
>> AccessExclusiveLock.  It probably needs such a lock *on the index* but
>> I don't see why we'd need it on the table.
>
> Some other session might be in process of planning a query on the table.
> It would be sad if the index it had chosen turned out to have vanished
> meanwhile.  You could perhaps confine DROP INDEX's ex-lock to the index,
> but only at the price of making the planner take out a lock on every
> index it considers even transiently.  Which isn't going to be a net
> improvement.

Oh.  I assumed we were doing that anyway. If not, yeah.

> (While we're on the subject, I have strong suspicions that most of what
> Simon did this cycle on ALTER TABLE lock strength reduction is
> hopelessly broken and will have to be reverted.  It's on my to-do list
> to try to break that patch during beta, and I expect to succeed.)

It wouldn't surprise me if there are some holes there.  But I'd like
to try to preserve as much of it as we can, and I think there's
probably a good chunk of it that is OK.

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



view thread (13+ messages)

Message-ID: <AANLkTin2QKROAP51xsf46Wc5xdev346UUmd_tpNmmY9P@mail.gmail.com>
Permalink:  ../AANLkTin2QKROAP51xsf46Wc5xdev346UUmd_tpNmmY9P@mail.gmail.com/
Also on:    postgresql.org/message-id/AANLkTin2QKROAP51xsf46Wc5xdev346UUmd_tpNmmY9P@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, tgl@sss.pgh.pa.us, noah@leadboat.com, nik9000@gmail.com
  Subject: Re: Exhaustive list of what takes what locks
  In-Reply-To: <AANLkTin2QKROAP51xsf46Wc5xdev346UUmd_tpNmmY9P@mail.gmail.com>
  References: <AANLkTiksaoSZ03m_jALCBwhfogZxNA5_wKo_3J6ydBfF@mail.gmail.com> <20110202052004.GA26098@tornado.gateway.2wire.net> <AANLkTikNzBfCQxsfed6qYTv0GrYZ8vM1wjwStjd8PwT=@mail.gmail.com> <20110223042108.GA27781@tornado.gateway.2wire.net> <AANLkTinf=fC9T8JJXsGMHDEggDNiXvj87opYfjO5huEq@mail.gmail.com> <2316.1298482279@sss.pgh.pa.us> <AANLkTin2QKROAP51xsf46Wc5xdev346UUmd_tpNmmY9P@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox