Re: Logical Replication of sequences

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: Logical Replication of sequences
Date: 2025-09-22 10:03:03
Message-ID: CAJpy0uAdD9XtZCE34BJhbvncMgfmMuTS0ZXLP1P=g+wpRC8vqQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

6)
I tried to test the patch. When sequences are more than the
batch-size, but not enough to make a complete batch of max size, I get
this error:

LOG: logical replication sequence synchronization for subscription
"sub1" - total unsynchronized: 118
LOG: logical replication sequence synchronization for subscription
"sub1" - batch #1 = 100 attempted, 100 succeeded, 0 skipped, 0
mismatched, 0 insufficient pemission, 0 missing,
WARNING: leaked hash_seq_search scan for hash table 0x5fcc78ff8f90
ERROR: no hash_seq_search scan for hash table "Logical replication
sequence sync worker sequences"
LOG: background worker "logical replication sequencesync worker" (PID
137165) exited with exit code 1

This is on creating 118 sequences. It can be easily reproduced by
reducing bath-size (MAX_SEQUENCES_SYNC_PER_BATCH) to say 5 and having
6 sequences in total. It seems we break out of the loop of creating a
batch only if batch_size >= MAX_SEQUENCES_SYNC_PER_BATCH. When we try
to access hash_seq_search() more than the entries present, it gives
the above error.

thanks
Shveta

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2025-09-22 10:03:26 Re: [PATCH] Introduce unified support for composite GUC options
Previous Message Чумак Антон 2025-09-22 09:13:46 Re: [PATCH] Introduce unified support for composite GUC options