pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <shammat@gmx.net>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Locking in Inheritance partition
Date: Fri, 10 Dec 2021 11:37:42 +0100
Message-ID: <396391e4-e36a-d51d-2ef1-1e454fd4d6fa@gmx.net> (raw)
In-Reply-To: <CAMZ99nd5AxvTi9ydjv-FJWmaWbo-npoqLciOmyOPhm7BERjEPQ@mail.gmail.com>
References: <CAMZ99nd5AxvTi9ydjv-FJWmaWbo-npoqLciOmyOPhm7BERjEPQ@mail.gmail.com>

Gaurav Anand schrieb am 10.12.2021 um 07:35:
> We have a declarative partition on tables in our database which is
> PG10. We face issues as the table becomes locked during attach and
> detach and cannot be used during the event.
>
> We have a master and slave setup and application query points to
> Slave but whenever we perform attach and detach of partitions on
> Master the locks propagates to slave and causes Application to spin.
>
> Kindly suggest if  Inheritance partition will help here or any other
> way I can avoid this lock.

I don't think inheritance would change the locks this requires.

A better solution might be to upgrade to 14 where both attach
and detach are non-blocking.

Postgres 12 introduced non-blocking attach and Postgres 14
introduced non-blocking detach

Thomas





view thread (3+ messages)  latest in thread

Message-ID: <396391e4-e36a-d51d-2ef1-1e454fd4d6fa@gmx.net>
Permalink:  ../396391e4-e36a-d51d-2ef1-1e454fd4d6fa@gmx.net/
Also on:    postgresql.org/message-id/396391e4-e36a-d51d-2ef1-1e454fd4d6fa@gmx.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: shammat@gmx.net, pgsql-admin@lists.postgresql.org
  Subject: Re: Locking in Inheritance partition
  In-Reply-To: <396391e4-e36a-d51d-2ef1-1e454fd4d6fa@gmx.net>

* 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