Re: Movement of restart_lsn position movement of logical replication slots is very slow

From: Jammie <shailesh(dot)jamloki(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Movement of restart_lsn position movement of logical replication slots is very slow
Date: 2021-01-12 03:45:11
Message-ID: CAFt1pcqRv3-u4FcSZ8a+1OvzXfiwy3wop7Wt2Xf0U0o17RWvMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Amit,
Thanks for the response .
Can you please let me know what pg_current_wal_lsn returns ?

is this position the LSN of the next log record to be created, or is it the
LSN of the last log record already created and inserted in the log?

The document says
- it returns current WAL write location.

Regards
Shailesh

On Thu, 24 Dec, 2020, 7:43 pm Amit Kapila, <amit(dot)kapila16(at)gmail(dot)com> wrote:

> On Thu, Dec 24, 2020 at 7:30 PM Jammie <shailesh(dot)jamloki(at)gmail(dot)com> wrote:
> >
> > Sorry dont have the debug setup handy. However the sql commands now
> works though to move the restart_lsn of the slots in standlone code from
> psql.
> >
> > A few followup questions.
> >
> > What is catalog_xmin in the pg_replication_slots ? and how is it playing
> role in moving the restart_lsn of the slot.
> >
> > I am just checking possibility that if a special transaction can cause
> private slot to stale ?
> >
>
> Yeah, it is possible if there is some old transaction is active in the
> system. The restart_lsn is lsn required by the oldesttxn. But it is
> strange that it affects only one of the slots.
>
> --
> With Regards,
> Amit Kapila.
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey V. Lepikhov 2021-01-12 03:45:19 Re: [POC] Fast COPY FROM command for the table with foreign partitions
Previous Message Neil Chen 2021-01-12 03:40:55 Re: Key management with tests