From: pavan95 <pavan.postgresdba@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Hick ups in Postgresql Logical Replication
Date: Mon, 15 Oct 2018 22:26:07 -0700 (MST)
Message-ID: <1539667567051-0.post@n3.nabble.com> (raw)
In-Reply-To: <81cfab86-c6dc-89a1-5685-7589e4f81f9d@catalyst.net.nz>
References: <1539447741900-0.post@n3.nabble.com>
<20427d4e-98a5-0cda-bddc-070989015cca@catalyst.net.nz>
<1539598263562-0.post@n3.nabble.com>
<81cfab86-c6dc-89a1-5685-7589e4f81f9d@catalyst.net.nz>
>With respect to the question about wal files and LSN, see the function
pg_walfile_name(), e.g:
>postgres=# SELECT pg_current_wal_lsn();
> pg_current_wal_lsn
>--------------------
> 0/51EB3BA8
>(1 row)
>postgres=# SELECT pg_walfile_name(pg_current_wal_lsn());
> pg_walfile_name
>--------------------------
> 000000010000000000000051
>(1 row)
Hi Mark,
My question was like how to get all the LSN's that are available in a WAL
segment. For example, take a segment named "000000010000000000000051".
So in the above archive log segment, how to get all the LSN's of all txn's
which belong to that segment ?
*The idea for asking this is, I will get the remote_lsn on the subscriber
which was successfully applied from the view "pg_replication_origin_status".
Based on the LSN, I will check in which archive segment that particular LSN
is present(as you said above).
And will find all the later LSN's(later to remote_lsn).
So I can say that these many transactions are yet to be applied to the
target.*
Regards,
Pavan,
9841380956
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: pavan.postgresdba@gmail.com
Subject: Re: Hick ups in Postgresql Logical Replication
In-Reply-To: <1539667567051-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox