Re: Perfomance decreasing - Mailing list pgsql-general

From Tom Lane
Subject Re: Perfomance decreasing
Date
Msg-id 28198.998019751@sss.pgh.pa.us
Whole thread Raw
In response to Re: Perfomance decreasing  (Hiroshi Inoue <Inoue@tpf.co.jp>)
List pgsql-general
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> One backend would be blocked by another one because reindex_relation
> calls reindex_index and reindex_index grabs an ExclusiveLock on the
> relation.
> Am I missing anything ?

It'd be okay if you *held* the lock throughout.  Grabbing and releasing
it isn't safe IMHO.  Just for one problem, what if someone else tries
to drop the relation in one of those intervals where you're not holding
a lock?

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: USING HASH considered harmful?
Next
From: Hiroshi Inoue
Date:
Subject: Re: Perfomance decreasing