Re: Hick ups in Postgresql Logical Replication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux