From: | Debraj Manna <subharaj(dot)manna(at)gmail(dot)com> |
---|---|
To: | Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: How to get current timeline of host in postgres 10.4? |
Date: | 2018-06-15 16:41:48 |
Message-ID: | CAF6DVKM1rX5GtqOr_yL-PwwnrpPrLBQ611jV2Dh=t-WT0i4gNA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Shreeyansh
I have executed the below query on master. But it is giving output like
below
postgres=# select pg_current_wal_lsn();
pg_current_wal_lsn
--------------------
0/4B17D198
(1 row)
In slave side it is saying timeline 6
ubuntu(at)platform1:~$ psql -h "localhost" -F' ' -c 'IDENTIFY_SYSTEM'
'dbname=replication replication=true' -U postgres
systemid | timeline | xlogpos | dbname
---------------------+----------+------------+--------
6567260231287314481 | 6 | 0/4B1786E0 |
How can I get the timeline from the output of the query in master?
On Fri, Jun 15, 2018 at 9:57 PM, Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
wrote:
> Hi Debraj,
>
> *Execute below query on Master Side : *
> select pg_current_wal_lsn();
> *Execute below query on Slave Side: *
> using replication protocol (example from version 10.4)
> psql -h "$host" -F' ' -c 'IDENTIFY_SYSTEM' 'dbname=replication
> replication=true'
> Hope it helps.
>
>
> <http://www.shreeyansh.com>
>
> On Fri, Jun 15, 2018 at 9:35 PM, Debraj Manna <subharaj(dot)manna(at)gmail(dot)com>
> wrote:
>
>> HI
>>
>> Can someone let me know what is the best way to get current timeline of
>> host (in both master and the slaves) in postgres 10.4?
>>
>> Thanks,
>>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Rui DeSousa | 2018-06-15 16:52:27 | Re: How to get current timeline of host in postgres 10.4? |
Previous Message | Shreeyansh Dba | 2018-06-15 16:27:07 | Re: How to get current timeline of host in postgres 10.4? |