From: | pavan95 <pavan(dot)postgresdba(at)gmail(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Hick ups in Postgresql Logical Replication |
Date: | 2018-10-16 05:26:07 |
Message-ID: | 1539667567051-0.post@n3.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
>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
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2018-10-16 06:07:29 | Re: Hick ups in Postgresql Logical Replication |
Previous Message | Mark Kirkwood | 2018-10-16 01:35:08 | Re: Hick ups in Postgresql Logical Replication |