Re: Logical Replication of sequences

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Hou, Zhijie/侯 志杰 <houzj(dot)fnst(at)fujitsu(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Subject: Re: Logical Replication of sequences
Date: 2024-08-13 04:03:44
Message-ID: CAHut+Pt4YfPnP67Lw9sZQpO2X3Jz676SmvOOKvK5gS8A4TXySQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 12, 2024 at 11:07 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Mon, 12 Aug 2024 at 10:40, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > Hi Vignesh,
> >
> > I found that when 2 subscriptions are both subscribing to a
> > publication publishing sequences, an ERROR occurs on refresh.
> >
> > ======
> >
> > Publisher:
> > ----------
> >
> > test_pub=# create publication pub1 for all sequences;
> >
> > Subscriber:
> > -----------
> >
> > test_sub=# create subscription sub1 connection 'dbname=test_pub'
> > publication pub1;
> >
> > test_sub=# create subscription sub2 connection 'dbname=test_pub'
> > publication pub1;
> >
> > test_sub=# alter subscription sub1 refresh publication sequences;
> > 2024-08-12 15:04:04.947 AEST [7306] LOG: sequence "public.seq1" of
> > subscription "sub1" set to INIT state
> > 2024-08-12 15:04:04.947 AEST [7306] STATEMENT: alter subscription
> > sub1 refresh publication sequences;
> > 2024-08-12 15:04:04.947 AEST [7306] LOG: sequence "public.seq1" of
> > subscription "sub1" set to INIT state
> > 2024-08-12 15:04:04.947 AEST [7306] STATEMENT: alter subscription
> > sub1 refresh publication sequences;
> > 2024-08-12 15:04:04.947 AEST [7306] ERROR: tuple already updated by self
> > 2024-08-12 15:04:04.947 AEST [7306] STATEMENT: alter subscription
> > sub1 refresh publication sequences;
> > ERROR: tuple already updated by self
> >
> > test_sub=# alter subscription sub2 refresh publication sequences;
> > 2024-08-12 15:04:30.427 AEST [7306] LOG: sequence "public.seq1" of
> > subscription "sub2" set to INIT state
> > 2024-08-12 15:04:30.427 AEST [7306] STATEMENT: alter subscription
> > sub2 refresh publication sequences;
> > 2024-08-12 15:04:30.427 AEST [7306] LOG: sequence "public.seq1" of
> > subscription "sub2" set to INIT state
> > 2024-08-12 15:04:30.427 AEST [7306] STATEMENT: alter subscription
> > sub2 refresh publication sequences;
> > 2024-08-12 15:04:30.427 AEST [7306] ERROR: tuple already updated by self
> > 2024-08-12 15:04:30.427 AEST [7306] STATEMENT: alter subscription
> > sub2 refresh publication sequences;
> > ERROR: tuple already updated by self
>
> This issue is fixed in the v20240812 version attached at [1].
> [1] - https://www.postgresql.org/message-id/CALDaNm3hS58W0RTbgsMTk-YvXwt956uabA%3DkYfLGUs3uRNC2Qg%40mail.gmail.com
>

Yes, I confirmed it is now fixed. Thanks!

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-08-13 04:18:37 Re: [bug fix] prepared transaction might be lost when max_prepared_transactions is zero on the subscriber
Previous Message Nisha Moond 2024-08-13 03:57:23 Re: Conflict detection and logging in logical replication