Re: logical decoding and replication of sequences

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Petr Jelinek <petr.jelinek@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, pgsql-hackers@lists.postgresql.org
Date: 2022-04-08T00:07:56Z
Lists: pgsql-hackers
Some typos I found before the patch was reverted.

diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index a6ea6ff3fcf..d4bd8d41c4b 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -834,9 +834,8 @@ typedef void (*LogicalDecodeSequenceCB) (struct LogicalDecodingContext *ctx,
       non-transactional increments, the transaction may be either NULL or not
       NULL, depending on if the transaction already has an XID assigned.
       The <parameter>sequence_lsn</parameter> has the WAL location of the
-      sequence update. <parameter>transactional</parameter> says if the
-      sequence has to be replayed as part of the transaction or directly.
-
+      sequence update. <parameter>transactional</parameter> indicates whether
+      the sequence has to be replayed as part of the transaction or directly.
       The <parameter>last_value</parameter>, <parameter>log_cnt</parameter> and
       <parameter>is_called</parameter> parameters describe the sequence change.
      </para>
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 60866431db3..b71122cce5d 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -927,7 +927,7 @@ ReorderBufferQueueMessage(ReorderBuffer *rb, TransactionId xid,
  * Treat the sequence increment as transactional?
  *
  * The hash table tracks all sequences created in in-progress transactions,
- * so we simply do a lookup (the sequence is identified by relfilende). If
+ * so we simply do a lookup (the sequence is identified by relfilenode). If
  * we find a match, the increment should be handled as transactional.
  */
 bool
@@ -2255,7 +2255,7 @@ ReorderBufferApplySequence(ReorderBuffer *rb, ReorderBufferTXN *txn,
 	tuple = &change->data.sequence.tuple->tuple;
 	seq = (Form_pg_sequence_data) GETSTRUCT(tuple);
 
-	/* Only ever called from ReorderBufferApplySequence, so transational. */
+	/* Only ever called from ReorderBufferApplySequence, so transactional. */
 	if (streaming)
 		rb->stream_sequence(rb, txn, change->lsn, relation, true,
 							seq->last_value, seq->log_cnt, seq->is_called);
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index a15ce9edb13..8193bfe6515 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -5601,7 +5601,7 @@ RelationBuildPublicationDesc(Relation relation, PublicationDesc *pubdesc)
 									 GetSchemaPublications(schemaid, objType));
 
 	/*
-	 * If this is a partion (and thus a table), lookup all ancestors and track
+	 * If this is a partition (and thus a table), lookup all ancestors and track
 	 * all publications them too.
 	 */
 	if (relation->rd_rel->relispartition)



Commits

  1. Fix cache invalidation bug in recovery_prefetch.

  2. Revert "Logical decoding of sequences"

  3. Minor improvements in sequence decoding code and docs

  4. Handle sequences in preprocess_pubobj_list

  5. Update tab-completion for CREATE PUBLICATION with sequences

  6. Add decoding of sequences to built-in replication

  7. Stabilize test_decoding touching with sequences

  8. Call ReorderBufferProcessXid from sequence_decode

  9. Add decoding of sequences to test_decoding

  10. Replace Test::More plans with done_testing

  11. Logical decoding of sequences

  12. Respect permissions within logical replication.