pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedGet LSN at which a cluster was promoted on previous timeline
3+ messages / 3 participants
[nested] [flat]
* Get LSN at which a cluster was promoted on previous timeline
@ 2019-01-05 01:36 Jeremy Finzel <finzelj@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Finzel @ 2019-01-05 01:36 UTC (permalink / raw)
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
I am having a hard time finding out how I can easily determine at which LSN
a streamer was promoted *after *promotion. A related question is that if I
pause wal replay, I am able to see the last replayed LSN but I can't simply
immediately promote.
I want to know the state of the streamer post-promotion with respect to the
master by getting the LSN at which it was promoted.
Thanks,
Jeremy
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Get LSN at which a cluster was promoted on previous timeline
@ 2019-01-05 02:41 Jerry Sievers <gsievers19@comcast.net>
parent: Jeremy Finzel <finzelj@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Jerry Sievers @ 2019-01-05 02:41 UTC (permalink / raw)
To: Jeremy Finzel <finzelj@gmail.com>; +Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Jeremy Finzel <finzelj@gmail.com> writes:
> I am having a hard time finding out how I can easily determine at
> which LSN a streamer was promoted after promotion. A related
> question is that if I pause wal replay, I am able to see the last
> replayed LSN but I can't simply immediately promote.
Take a look at the *.history file in pg_xlog or pg_wal.
> I want to know the state of the streamer post-promotion with respect
> to the master by getting the LSN at which it was promoted.
>
> Thanks,
> Jeremy
>
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Get LSN at which a cluster was promoted on previous timeline
@ 2019-01-05 03:54 Michael Paquier <michael@paquier.xyz>
parent: Jerry Sievers <gsievers19@comcast.net>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Paquier @ 2019-01-05 03:54 UTC (permalink / raw)
To: Jerry Sievers <gsievers19@comcast.net>; +Cc: Jeremy Finzel <finzelj@gmail.com>; PostgreSQL General <pgsql-general@lists.postgresql.org>
On Fri, Jan 04, 2019 at 08:41:35PM -0600, Jerry Sievers wrote:
> Take a look at the *.history file in pg_xlog or pg_wal.
These files are also archived. If you want to be able to see such
contents at SQL level, you would need some parsing logic like this one
for example which is a toy of mine (this comes mainly from
rewind_parseTimeLineHistory() if I recall correctly):
https://github.com/michaelpq/pg_plugins/tree/master/wal_utils
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2019-01-05 03:54 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-05 01:36 Get LSN at which a cluster was promoted on previous timeline Jeremy Finzel <finzelj@gmail.com>
2019-01-05 02:41 ` Jerry Sievers <gsievers19@comcast.net>
2019-01-05 03:54 ` Michael Paquier <michael@paquier.xyz>
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