Re: BUG #15313: Waiting `startup` process on a streaming replica

From: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
To: Victor Yegorov <vyegorov(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15313: Waiting `startup` process on a streaming replica
Date: 2018-08-07 15:18:29
Message-ID: CAK-MWwSJDK2YF3v0nuDP=562kVALRR8ooBZWThqk0A=do_cQxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Aug 7, 2018 at 4:40 PM, Victor Yegorov <vyegorov(at)gmail(dot)com> wrote:

> вт, 7 авг. 2018 г. в 16:36, PG Bug reporting form <noreply(at)postgresql(dot)org
> >:
>
>>
>> Bug reference: 15313
>> Logged by: Victor Yegorov
>> Email address: vyegorov(at)gmail(dot)com
>> PostgreSQL version: 10.4
>> Operating system: Ubuntu 14.04.5 LTS (trusty)
>> Description:
>>
>
> In the attached files, 22607 is pid of a waiting session (we have had
> around 100 sessions in such state)
> and 22591 is a pid of a startup process.
>
>
> --
> Victor Yegorov
>

Some additional notes about this problem:

1)deadlock_timeout cannot not resolve this problem or simple cannot detect
it properly.
2)max_standby_streaming_delay doesn't work as well (with sufficiently high
rate of new problem queries from application).

Only one way to fix it on the loaded replica is preventing all new incoming
connections via pg_hba.conf, killing all locked queries and verify that the
offending part of wal had been replayed. No built-in mechanisms designed to
deal with such issues work in that case. Only manual intervention.

I seen such issues like 10 times over last year on different projects. It
isn't once per lifetime issue unfortunately.

--
Maxim Boguk
Senior Postgresql DBA
http://dataegret.com/ <http://www.postgresql-consulting.com/>

Phone RU: +7 985 433 0000
Phone UA: +380 99 143 0000
Phone AU: +61 45 218 5678

LinkedIn: http://www.linkedin.com/pub/maksym-boguk/80/b99/b1b
Skype: maxim.boguk

"Доктор, вы мне советовали так не делать, но почему мне по-прежнему больно
когда я так делаю ещё раз?"

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2018-08-07 15:31:21 Re: BUG #15312: Possible access to unintended variable in "postgres/src/backend/postmaster/pgstat.c" line 2698
Previous Message Bruce Momjian 2018-08-07 15:05:54 Re: BUG #15269: Can't reassign bg color to server group once it was done previously