Re: Re: Is there any plan to support online schem change in postgresql? - Mailing list pgsql-hackers

From hubert depesz lubaczewski
Subject Re: Re: Is there any plan to support online schem change in postgresql?
Date
Msg-id Y0VlZFs0/m5d2QIR@depesz.com
Whole thread Raw
In response to Is there any plan to support online schem change in postgresql?  (jiye <jiye_sw@126.com>)
List 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/dropcolumn 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



pgsql-hackers by date:

Previous
From: Önder Kalacı
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Next
From: Ajin Cherian
Date:
Subject: Re: Support logical replication of DDLs