Search Postgresql Archives

how to know current xlog location on standby after primary is down

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

 



Hello, 

I'm working on a high availability project for PG(v9.6).

Suppose I have a priamry-standby setup, I need to do promote once
primary is down, but only when standby is as new as primary (before it
is down). Therefore, I need a way to know the wal replay location on
standby.

I tried to set a hot standby, but it failed to run
`pg_current_xlog_location()` on it; I also tried `pg_xlogdump` on
standby, but it has following cavets:

- hard to identify latest used wal segment, since there are some
renamed reservations
- sometimes `pg_xlogdump` will raise errors like: "pg_xlogdump:
FATAL:  error in WAL record at 0/9F88F0F8: record with incorrect prev-
link 2020/20202020 at 0/9F88F130"

So I want to know what is the correct way to do it. Thank you in
advance!






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux