Re: Re: Is there any plan to support online schem change in postgresql?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: jiye <jiye_sw(at)126(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Re: Is there any plan to support online schem change in postgresql?
Date: 2022-10-11 12:45:24
Message-ID: Y0VlZFs0/m5d2QIR@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 11, 2022 at 08:31:53PM +0800, jiye wrote:
> But, as follow, if txn1 not commit (just like long term readonly txn), it will block txn2's ddl job, why alt add/drop column can not concurrently with read only access?
> txn1: long term txn not commit access t1.
> txn2 waiting txn1 to commit or abort.
> txn3 wait txn2...

1. Please don't share code as screenshots.
2. If I understand your text above correctly, then the solution is
trivial:
https://www.depesz.com/2019/09/26/how-to-run-short-alter-table-without-long-locking-concurrent-queries/

depesz

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajin Cherian 2022-10-11 13:30:37 Re: Support logical replication of DDLs
Previous Message Önder Kalacı 2022-10-11 12:44:06 Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher