Re: Perfomance decreasing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Alexander Loginov <sas(at)mplik(dot)ru>, pgsql-general(at)postgresql(dot)org
Subject: Re: Perfomance decreasing
Date: 2001-08-17 03:42:31
Message-ID: 28198.998019751@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hiroshi Inoue 2001-08-17 04:04:41 Re: Perfomance decreasing
Previous Message William D. Tallman 2001-08-17 03:09:59 Real newbie question.