From: jaime soler <jaime.soler@gmail.com>
To: Dave Johansen <davejohansen@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: CLUSTERing a partition?
Date: Sat, 14 Mar 2015 12:26:33 +0100
Message-ID: <1426332393.3775.3.camel@gmail.com> (raw)
In-Reply-To: <CAAcYxUeFzDWdGAVdpZX8NDLqWo_V7o5xtnafvXmML0jG_JHFPA@mail.gmail.com>
References: <CAAcYxUeFzDWdGAVdpZX8NDLqWo_V7o5xtnafvXmML0jG_JHFPA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
El vie, 13-03-2015 a las 16:33 -0700, Dave Johansen escribió:
> 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.
>
uff postgresql 8.4, are you from the past?
>
> 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.
There is a extension pg_repack http://pgxn.org/dist/pg_repack/1.3.1/ ,
that allows to retore order of a table without using a exclusive lock,
but i don't know how it behavior with partitioned tables.
good luck
>
>
> Thanks,
>
> Dave
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jaime.soler@gmail.com, davejohansen@gmail.com
Subject: Re: CLUSTERing a partition?
In-Reply-To: <1426332393.3775.3.camel@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