public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andreas Karlsson <[email protected]>
To: Vitaly Davydov <[email protected]>
To: [email protected]
Subject: Re: Support logical replication of DDLs
Date: Mon, 9 Feb 2026 14:40:42 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <OSZPR01MB63102C42A24D59FACF6D9CD6FD4A9@OSZPR01MB6310.jpnprd01.prod.outlook.com>
	<OS3PR01MB6275328379FBE5734B4585619E54A@OS3PR01MB6275.jpnprd01.prod.outlook.com>
	<[email protected]>
	<CAA4eK1J8WOK9VZ9RpQRNRhRYhFOKQCu=GLCu+iBOePNO3JwLbQ@mail.gmail.com>
	<[email protected]>
	<CAJpy0uDaubBHyqPc1k0OysuBYDOVdoUgTWG4jXDCYj-OVSU8hg@mail.gmail.com>
	<CAA4eK1+K8KMsB=+jJO6wDUSt7wF1RiXKtF-HN48nCOEOv-J-3Q@mail.gmail.com>
	<CAJpy0uDLLBYAOzCePYObZ51k1epBU0hef4vbfcujKJprJVsEcQ@mail.gmail.com>
	<CAJpy0uAhLjQZ0Dh0KWDFP8mrnG0rbx99_heavwn8Ke8ZuD-Umg@mail.gmail.com>
	<OS0PR01MB5716A47D23EFAF988475D4A99431A@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<CAD21AoCXCAQ5QyXu9-xs30ViUHtUxQMmf-818d8GX--5pTmZ7g@mail.gmail.com>
	<OS0PR01MB57163E6487EFF7378CB8E17C9438A@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<[email protected]>
	<CAA4eK1JpAcvnfOqF2DQo79pf7Cqp5=3HU5UDwBonWXW4V9ot=w@mail.gmail.com>
	<[email protected]>

On 2/2/26 5:04 PM, Vitaly Davydov wrote:
> 1. Log into the WAL system catalog changes (tuples) suitable for logical
> decoding (introduce a new wal_level = logical_ddl). I think, not all system
> catalog changes are needed for decoding (not sure, we have to decode 
> pg_depend
> changes).
> 
> 2. Implement a decoder of system catalog changes, that can produce a 
> parse tree
> using existing structures from parsenodes.h.
> 
> 3. Based on the decoded parse tree, we can convert it into json or DDL SQL
> statements in the output plugin. ParseTree to DDL SQL converter can be 
> built-in
> into the core. Output plugin can decide which converter to use. DDL sql 
> can be
> directly applied on the replica.
> 
> 4. Another option is to create json/ddl-sql from system catalog changes 
> without
> an intermediate representation, but, anyway, when we interpret system 
> catalog
> changes we have to temporary save current data in some structures. 
> Parsenodes
> is the already existing solution for it.

With this approach how do you intend to handle DDL changes which alter 
data? To take a simple case we have the USING clause when altering a 
column. Maybe it is a fine limitation to just not support it but I am 
not convinced.

Andreas







view thread (10+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Support logical replication of DDLs
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox