Re: Improve the error message for logical replication of regular column to generated column.

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Shubham Khanna <khannashubham1197(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve the error message for logical replication of regular column to generated column.
Date: 2024-11-26 21:59:36
Message-ID: CAHut+PszjwfVj-WPkP50sooxqDfC=DiwxHpsSACZkhgOHgKxHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, here are some review comments for patch v7-0001.

======
src/backend/replication/logical/relation.c

logicalrep_report_missing_or_gen_attrs:

1.
+/*
+ * If attempting to replicate missing or generated columns, report an error.
+ * Prioritize 'missing' errors if both occur though the prioritization is
+ * random.
+ */

That part "though the prioritization is random" seems wrongly worded
because there is nothing random here.

I guess the intention was something like "This prioritization design
choice was arbitrary.", but TBH it may be better not to give any
reason at all.

======
src/test/subscription/t/011_generated.pl

2.
+# =============================================================================
+# The following test for expected error when attempting to replicate to a
+# generated subscriber column. Test the following combination
+# - regular -> generated
+# - generated -> generated
+# =============================================================================
+

Some plurals seemed wrong to me. e.g. "combination" etc.

SUGGESTION:
The following test verifies the expected error when replicating to a
generated subscriber column. Test the following combinations:

======
Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-11-26 22:07:12 Re: Changing the state of data checksums in a running cluster
Previous Message Jelte Fennema-Nio 2024-11-26 21:55:07 Re: UUID v7