Determine which query prevents applying WALs on standby

Поиск
Список
Период
Сортировка
Искать

Determine which query prevents applying WALs on standby

От:
Andrey Zhidenkov <andrey.zhidenkov@gmail.com>
Дата:
Is there a way to detect which query (or queries) on hot standby holds
streaming replication? Looked into the sources and found out that
function ResolveRecoveryConflictWithVirtualXIDs do that job but have
no idea how to do that with SQL.

--
With best regards, Andrey Zhidenkov.

Re: Determine which query prevents applying WALs on standby

От:
Jerry Sievers <gsievers19@comcast.net>
Дата:
Andrey Zhidenkov  writes:

> Is there a way to detect which query (or queries) on hot standby holds
> streaming replication? Looked into the sources and found out that
> function ResolveRecoveryConflictWithVirtualXIDs do that job but have
> no idea how to do that with SQL.

The pg_locks view on your standby should reveal something.

>
> --
> With best regards, Andrey Zhidenkov.
>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800

答复: Determine which query prevents applying WALs on standby

От:
"For your eyes only..." <xzyshnok@msn.com>
Дата:
Hi team,

Would please remove me from it.


Beat Regard,
Zhenyu Xu

-----邮件原件-----
发件人: Jerry Sievers  
发送时间: Thursday, September 6, 2018 23:35
收件人: Andrey Zhidenkov 
抄送: pgsql-admin@postgresql.org
主题: Re: Determine which query prevents applying WALs on standby

Andrey Zhidenkov  writes:

> Is there a way to detect which query (or queries) on hot standby holds 
> streaming replication? Looked into the sources and found out that 
> function ResolveRecoveryConflictWithVirtualXIDs do that job but have 
> no idea how to do that with SQL.

The pg_locks view on your standby should reveal something.

>
> --
> With best regards, Andrey Zhidenkov.
>
>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800

FAQ