diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 19d04b1..dcd0b98 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -8102,8 +8102,8 @@ SCRAM-SHA-256$<iteration count>:&l
- The catalog pg_subscription_rel contains the
- state for each replicated tables and sequences in each subscription. This
+ The catalog pg_subscription_rel stores the
+ state of each replicated table and sequence for each subscription. This
is a many-to-many mapping.
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index a3e7c79..f292fbc 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -342,7 +342,7 @@ ResetSequence(Oid seq_relid)
* logical replication.
*/
void
-SetSequenceLastValue(Oid seq_relid, int64 new_last_value, int64 log_cnt)
+SetSequenceLastValue(Oid seq_relid, int64 new_last_value, int64 new_log_cnt)
{
SeqTable elm;
Relation seqrel;
@@ -370,7 +370,7 @@ SetSequenceLastValue(Oid seq_relid, int64 new_last_value, int64 log_cnt)
seq->last_value = new_last_value;
seq->is_called = true;
- seq->log_cnt = log_cnt;
+ seq->log_cnt = new_log_cnt;
MarkBufferDirty(buf);
diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h
index a302890..4c6aee0 100644
--- a/src/include/commands/sequence.h
+++ b/src/include/commands/sequence.h
@@ -60,7 +60,7 @@ extern ObjectAddress AlterSequence(ParseState *pstate, AlterSeqStmt *stmt);
extern void SequenceChangePersistence(Oid relid, char newrelpersistence);
extern void DeleteSequenceTuple(Oid relid);
extern void ResetSequence(Oid seq_relid);
-extern void SetSequenceLastValue(Oid seq_relid, int64 new_last_value, int64 log_cnt);
+extern void SetSequenceLastValue(Oid seq_relid, int64 new_last_value, int64 new_log_cnt);
extern void ResetSequenceCaches(void);
extern void seq_redo(XLogReaderState *record);