CLUSTERing a partition?

From: Dave Johansen <davejohansen(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: CLUSTERing a partition?
Date: 2015-03-13 23:33:08
Message-ID: CAAcYxUeFzDWdGAVdpZX8NDLqWo_V7o5xtnafvXmML0jG_JHFPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I'm using Postgres 8.4 and I would like to cluster a partition but keep
running into issues with locks. CLUSTER requires an Exclusive Lock and so
it gets "stuck behind" running queries that have a Share Lock on the
partition even though they are not using the partition. I would be fine if
the cluster waited until after the existing queries finished, but this then
causes all new queries to back up behind it. I tried doing "NO INHERIT" to
remove the partition while the cluster is happening, but that also requires
an Exclusive Lock and runs into the same problem.

So is there some way that I can CLUSTER a partition? I would be fine with
removing the partition while the CLUSTER is happening, if that makes it
possible.

Thanks,
Dave

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message jaime soler 2015-03-14 11:26:33 Re: CLUSTERing a partition?
Previous Message Venkata Balaji N 2015-03-13 22:32:02 Re: I am working on trying to improve a database perfomance in version 9.2 Postgresql database server