pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to monitor logical replication initial sync?
3+ messages / 3 participants
[nested] [flat]
* How to monitor logical replication initial sync?
@ 2018-03-07 23:23 Doug Gorley <doug@gorley.ca>
2018-03-15 13:19 ` Re: How to monitor logical replication initial sync? bricklen <bricklen@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Doug Gorley @ 2018-03-07 23:23 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Good day,
How does one monitor the status or progress of an initial sync under logical replication? For example:
* I create a publication in database db_pub
* I create a subscription in database db_sub
* In 15 minutes I want to check an see that the initial sync is N% complete
Is it possible to tell when the initial sync is complete, or better yet, how complete it is?
Thanks,
---
Doug Gorley | doug@gorley.ca
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to monitor logical replication initial sync?
2018-03-07 23:23 How to monitor logical replication initial sync? Doug Gorley <doug@gorley.ca>
@ 2018-03-15 13:19 ` bricklen <bricklen@gmail.com>
2018-04-09 18:09 ` Re: How to monitor logical replication initial sync? Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 3+ messages in thread
From: bricklen @ 2018-03-15 13:19 UTC (permalink / raw)
To: Doug Gorley <doug@gorley.ca>; +Cc: pgsql-general@postgresql.org
On Wed, Mar 7, 2018 at 3:23 PM, Doug Gorley <doug@gorley.ca> wrote:
> Good day,
>
> How does one monitor the status or progress of an initial sync under
> logical replication? For example:
>
> * I create a publication in database db_pub
> * I create a subscription in database db_sub
> * In 15 minutes I want to check an see that the initial sync is N% complete
>
> Is it possible to tell when the initial sync is complete, or better yet,
> how complete it is?
>
This is a question I'm quite interested in as well (and one I do not have
an answer to).
Does anyone with more familiarity with logical replication have any
suggestions on how to determine the status of the initial sync?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: How to monitor logical replication initial sync?
2018-03-07 23:23 How to monitor logical replication initial sync? Doug Gorley <doug@gorley.ca>
2018-03-15 13:19 ` Re: How to monitor logical replication initial sync? bricklen <bricklen@gmail.com>
@ 2018-04-09 18:09 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2018-04-09 18:09 UTC (permalink / raw)
To: bricklen <bricklen@gmail.com>; Doug Gorley <doug@gorley.ca>; +Cc: pgsql-general@postgresql.org
On 3/15/18 09:19, bricklen wrote:
> How does one monitor the status or progress of an initial sync under
> logical replication? For example:
>
> * I create a publication in database db_pub
> * I create a subscription in database db_sub
> * In 15 minutes I want to check an see that the initial sync is N%
> complete
>
> Is it possible to tell when the initial sync is complete, or better
> yet, how complete it is?
>
>
> This is a question I'm quite interested in as well (and one I do not
> have an answer to).
>
> Does anyone with more familiarity with logical replication have any
> suggestions on how to determine the status of the initial sync?
Something like
select * from pg_subscription_rel where srsubstate <> 'r' and srsubid =
(select oid from pg_subscription where subname = 'mysub');
The key is checking the srsubstate column for 'r' (ready).
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-04-09 18:09 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 23:23 How to monitor logical replication initial sync? Doug Gorley <doug@gorley.ca>
2018-03-15 13:19 ` bricklen <bricklen@gmail.com>
2018-04-09 18:09 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
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