From: hubert depesz lubaczewski <depesz@depesz.com>
To: Joseph Hammerman <joe.hammerman@datadoghq.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Migrating tables to new schema with minimal downtime
Date: Tue, 7 Mar 2023 12:59:58 +0100
Message-ID: <ZAcnPjgwX4zF5QXf@depesz.com> (raw)
In-Reply-To: <CAHs7QM8aCJ_a=Rcf=eYAS27eY9Ue6NV5CO+00+ZJnRWbSbxgVg@mail.gmail.com>
References: <CAHs7QM8aCJ_a=Rcf=eYAS27eY9Ue6NV5CO+00+ZJnRWbSbxgVg@mail.gmail.com>
On Mon, Mar 06, 2023 at 01:00:15PM -0800, Joseph Hammerman wrote:
> Would it be data safe if I took an ACCESS EXCLUSIVE lock on the table?
alter table gets ACCESS EXCLUSIVE lock on its own.
You can test it trivially in psql on some side table.
Best regards,
depesz
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: depesz@depesz.com, joe.hammerman@datadoghq.com, pgsql-admin@lists.postgresql.org
Subject: Re: Migrating tables to new schema with minimal downtime
In-Reply-To: <ZAcnPjgwX4zF5QXf@depesz.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