DOCS: Generated table columns are skipped by logical replication

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: DOCS: Generated table columns are skipped by logical replication
Date: 2024-06-18 06:40:36
Message-ID: CAHut+PuXb1GLQztQkoWzYjSwkAZZ0dgCJaAHyJtZF3kmtcL=kA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

While reviewing another thread that proposes to include "generated
columns" support for logical replication [1] I was looking for any
existing PostgreSQL documentation on this topic.

But, I found almost nothing about it at all -- I only saw one aside
mention saying that logical replication low-level message information
is not sent for generated columns [2].

~~

IMO there should be some high-level place in the docs where the
behaviour for logical replication w.r.t. generated columns is
described.

There are lots of candidate places which could talk about this topic.
* e.g.1 in "Generated Columns" (section 5.4)
* e.g.2 in LR "Column-Lists" docs (section 29.5)
* e.g.3 in LR "Restrictions" docs (section 29.7)
* e.g.4 in the "CREATE PUBLICATION" reference page

For now, I have provided just a simple patch for the "Generated
Columns" section [3]. Perhaps it is enough.

Thoughts?

======
[1] https://www.postgresql.org/message-id/flat/B80D17B2-2C8E-4C7D-87F2-E5B4BE3C069E%40gmail.com
[2] https://www.postgresql.org/docs/devel/protocol-logicalrep-message-formats.html
[3] https://www.postgresql.org/docs/devel/ddl-generated-columns.html

Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v1-0001-generated-columns-are-skipped-for-logical-replica.patch application/octet-stream 849 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-06-18 06:41:13 Re: Conflict Detection and Resolution
Previous Message Dilip Kumar 2024-06-18 06:24:10 Re: Conflict Detection and Resolution