pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15313: Waiting `startup` process on a streaming replica
3+ messages / 3 participants
[nested] [flat]

* BUG #15313: Waiting `startup` process on a streaming replica
@ 2018-08-07 13:35 PG Bug reporting form <noreply@postgresql.org>
  2018-08-07 13:40 ` Re: BUG #15313: Waiting `startup` process on a streaming replica Victor Yegorov <vyegorov@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2018-08-07 13:35 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: vyegorov@gmail.com

The following bug has been logged on the website:

Bug reference:      15313
Logged by:          Victor Yegorov
Email address:      vyegorov@gmail.com
PostgreSQL version: 10.4
Operating system:   Ubuntu 14.04.5 LTS (trusty)
Description:        

We have one customer, that get one of their HotStandby replicas to be stuck
via `startup` process deadlock against session.
Case can be reproduced, we've installed dbg packages and collected
backtraces (I will attach them in a followup e-mail).

This happens during schema changes on the master. Processes is being far
from optimal, as they re-create all triggers,
views and materialized views in the scope. We've recommended this customer
to avoid such heavy schema changes.

Still, as we have evidence at hands, here comes the report.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15313: Waiting `startup` process on a streaming replica
  2018-08-07 13:35 BUG #15313: Waiting `startup` process on a streaming replica PG Bug reporting form <noreply@postgresql.org>
@ 2018-08-07 13:40 ` Victor Yegorov <vyegorov@gmail.com>
  2018-08-07 15:18   ` Re: BUG #15313: Waiting `startup` process on a streaming replica Maxim Boguk <maxim.boguk@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Victor Yegorov @ 2018-08-07 13:40 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

вт, 7 авг. 2018 г. в 16:36, PG Bug reporting form <noreply@postgresql.org>:

>
> Bug reference:      15313
> Logged by:          Victor Yegorov
> Email address:      vyegorov@gmail.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

Attachments:

20180807-15313-pg_stat_activity.txt (text/plain, 3.6K) download postgres=# SELECT version(); version ----------------------------------------------------------------------------------------------------------------------------------- PostgreSQL 10.4 (Ubuntu 10.4-2.pgdg14.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4, 64-bit postgres=# SELECT * FROM pg_stat_activity WHERE pid IN (22591,22607)\gx -[ RECORD 1 ]----+----------------------------------------------------------------------------------------------- datid | 16400 datname | da pid | 22607 usesysid | 16384 usename | da application_name | client_addr | 192.168.37.43 client_hostname | client_port | 57089 backend_start | 2018-08-07 15:00:44.198289+03 xact_start | 2018-08-07 15:24:43.165418+03 query_start | 2018-08-07 15:24:43.165418+03 state_change | 2018-08-07 15:24:43.165421+03 wait_event_type | Lock wait_event | relation state | active backend_xid | backend_xmin | 1065072121 query | + | SELECT + | s.storage, + | fm.path AS filepath, + | s.url AS serverurl, + | cf.title AS type + | FROM kaltura_file_meta + | JOIN files fi ON file_id = fi.id + | JOIN content_format ci on ci.id = fi.format AND ci.title = 'VODHLS-FPS-ABRSHQ'+ | JOIN files fm on fm.id = any(mp4_file_ids) + | JOIN content_format cf on cf.id = fm.format + | JOIN servers s on s.id = fm.server_id + | WHERE cf.title LIKE 'MP4%' + | AND substring(fi.path from 1 for 34) = 'e/2/24285854bae493728262bc89786f9a' + | + | ORDER BY cf.title + | ; + | backend_type | client backend -[ RECORD 2 ]----+----------------------------------------------------------------------------------------------- datid | datname | pid | 22591 usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | 2018-08-07 15:00:43.285428+03 xact_start | query_start | state_change | wait_event_type | Lock wait_event | relation state | backend_xid | backend_xmin | query | backend_type | startup
20180807-15313-pg_locks.txt (text/plain, 2.1K) download da=# SELECT locktype,(SELECT datname FROM pg_database WHERE oid=database),relation::regclass,page,tuple,virtualxid,transactionid,classid,objid,objsubid,virtualtransaction,pid,mode,granted,fastpath FROM pg_locks WHERE pid IN (22607) ORDER BY pid; locktype | datname | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted | fastpath ------------+---------+-------------------+------+-------+------------+---------------+---------+-------+----------+--------------------+-------+-----------------+---------+---------- virtualxid | | | | | 2/136 | | | | | 2/136 | 22607 | ExclusiveLock | t | t relation | da | files | | | | | | | | 2/136 | 22607 | AccessShareLock | f | f relation | da | kaltura_file_meta | | | | | | | | 2/136 | 22607 | AccessShareLock | t | f (3 rows) da=# SELECT locktype,(SELECT datname FROM pg_database WHERE oid=database),relation::regclass,page,tuple,virtualxid,transactionid,classid,objid,objsubid,virtualtransaction,pid,mode,granted,fastpath FROM pg_locks WHERE pid IN (22591) AND relation IN ('files'::regclass, 'kaltura_file_meta'::regclass) ORDER BY pid; locktype | datname | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted | fastpath ----------+---------+-------------------+------+-------+------------+---------------+---------+-------+----------+--------------------+-------+---------------------+---------+---------- relation | da | files | | | | | | | | 1/0 | 22591 | AccessExclusiveLock | t | f relation | da | kaltura_file_meta | | | | | | | | 1/0 | 22591 | AccessExclusiveLock | f | f (2 rows)
20180807-15313-gdb.txt (text/plain, 12.6K) download 22591 / startup waiting (gdb) bt #0 0x00007f99d73fa673 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x0000561c55fa8739 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fff06f56a00, cur_timeout=-1, set=0x561c5751b338) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:1048 #2 WaitEventSetWait (set=set@entry=0x561c5751b338, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fff06f56a00, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=50331648) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:1000 #3 0x0000561c55fa8bb1 in WaitLatchOrSocket (latch=0x7f99cb0dc494, wakeEvents=wakeEvents@entry=1, sock=sock@entry=-1, timeout=-1, timeout@entry=0, wait_event_info=50331648) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:385 #4 0x0000561c55fa8c45 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=1, timeout=timeout@entry=0, wait_event_info=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:339 #5 0x0000561c55fb9011 in ProcWaitForSignal (wait_event_info=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/proc.c:1768 #6 0x0000561c55fafe2c in ResolveRecoveryConflictWithLock (locktag=...) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/standby.c:395 #7 0x0000561c55fb8467 in ProcSleep (locallock=locallock@entry=0x561c5754a058, lockMethodTable=lockMethodTable@entry=0x561c56522d80 <default_lockmethod>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/proc.c:1251 #8 0x0000561c55fb309a in WaitOnLock (locallock=locallock@entry=0x561c5754a058, owner=owner@entry=0x0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/lock.c:1702 #9 0x0000561c55fb452a in LockAcquireExtended (locktag=locktag@entry=0x7fff06f56e00, lockmode=lockmode@entry=8, sessionLock=sessionLock@entry=1 '\001', dontWait=dontWait@entry=0 '\000', reportMemoryError=reportMemoryError@entry=0 '\000') at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/lock.c:998 #10 0x0000561c55fb00d2 in StandbyAcquireAccessExclusiveLock (xid=1065072121, dbOid=16400, relOid=20670) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/standby.c:627 #11 0x0000561c55fb050c in standby_redo (record=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/standby.c:809 #12 0x0000561c55d9278b in StartupXLOG () at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/access/transam/xlog.c:7183 #13 0x0000561c55f5d473 in StartupProcessMain () at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/postmaster/startup.c:217 #14 0x0000561c55da15f5 in AuxiliaryProcessMain (argc=argc@entry=2, argv=argv@entry=0x7fff06f5a640) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/bootstrap/bootstrap.c:426 #15 0x0000561c55f5a1e9 in StartChildProcess (type=StartupProcess) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/postmaster/postmaster.c:5361 #16 0x0000561c55f5cc8a in PostmasterMain (argc=5, argv=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/postmaster/postmaster.c:1355 #17 0x0000561c55d100c6 in main (argc=5, argv=0x561c574be1f0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/main/main.c:228 22607 / SELECT waiting (gdb) bt #0 0x00007f99d73fa673 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x0000561c55fa8739 in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7fff06f58ac0, cur_timeout=-1, set=0x561c5755ca80) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:1048 #2 WaitEventSetWait (set=set@entry=0x561c5755ca80, timeout=timeout@entry=-1, occurred_events=occurred_events@entry=0x7fff06f58ac0, nevents=nevents@entry=1, wait_event_info=wait_event_info@entry=50331648) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:1000 #3 0x0000561c55fa8bb1 in WaitLatchOrSocket (latch=0x7f99cb0d97f4, wakeEvents=wakeEvents@entry=1, sock=sock@entry=-1, timeout=-1, timeout@entry=0, wait_event_info=50331648) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:385 #4 0x0000561c55fa8c45 in WaitLatch (latch=<optimized out>, wakeEvents=wakeEvents@entry=1, timeout=timeout@entry=0, wait_event_info=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/ipc/latch.c:339 #5 0x0000561c55fb8511 in ProcSleep (locallock=locallock@entry=0x561c57505958, lockMethodTable=lockMethodTable@entry=0x561c56522d80 <default_lockmethod>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/proc.c:1255 #6 0x0000561c55fb309a in WaitOnLock (locallock=locallock@entry=0x561c57505958, owner=owner@entry=0x561c574c01b8) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/lock.c:1702 #7 0x0000561c55fb452a in LockAcquireExtended (locktag=locktag@entry=0x7fff06f58e50, lockmode=lockmode@entry=1, sessionLock=sessionLock@entry=0 '\000', dontWait=dontWait@entry=0 '\000', reportMemoryError=reportMemoryError@entry=1 '\001') at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/lock.c:998 #8 0x0000561c55fb4b86 in LockAcquire (locktag=locktag@entry=0x7fff06f58e50, lockmode=lockmode@entry=1, sessionLock=sessionLock@entry=0 '\000', dontWait=dontWait@entry=0 '\000') at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/lock.c:688 #9 0x0000561c55fb1eff in LockRelationOid (relid=19187, lockmode=1) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/storage/lmgr/lmgr.c:112 #10 0x0000561c55daf0e5 in RangeVarGetRelidExtended (relation=0x561c57561268, lockmode=1, missing_ok=1 '\001', nowait=nowait@entry=0 '\000', callback=callback@entry=0x0, callback_arg=callback_arg@entry=0x0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/catalog/namespace.c:365 #11 0x0000561c55d4757c in relation_openrv_extended (relation=<optimized out>, lockmode=<optimized out>, missing_ok=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/access/heap/heapam.c:1240 #12 0x0000561c55d47761 in heap_openrv_extended (relation=relation@entry=0x561c57561268, lockmode=lockmode@entry=1, missing_ok=missing_ok@entry=1 '\001') at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/access/heap/heapam.c:1346 #13 0x0000561c55e0837a in parserOpenTable (pstate=pstate@entry=0x561c5755c350, relation=relation@entry=0x561c57561268, lockmode=1) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_relation.c:1152 #14 0x0000561c55e09cba in addRangeTableEntry (pstate=pstate@entry=0x561c5755c350, relation=relation@entry=0x561c57561268, alias=0x561c575612b8, inh=<optimized out>, inFromCl=inFromCl@entry=1 '\001') at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_relation.c:1217 #15 0x0000561c55df5059 in transformTableEntry (r=0x561c57561268, pstate=0x561c5755c350) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:428 #16 transformFromClauseItem (pstate=pstate@entry=0x561c5755c350, n=0x561c57561268, top_rte=top_rte@entry=0x7fff06f591c8, top_rti=top_rti@entry=0x7fff06f591b4, namespace=namespace@entry=0x7fff06f591d8) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:1114 #17 0x0000561c55df4727 in transformFromClauseItem (pstate=pstate@entry=0x561c5755c350, n=0x561c57561570, top_rte=top_rte@entry=0x7fff06f592f0, top_rti=top_rti@entry=0x7fff06f592e0, namespace=namespace@entry=0x7fff06f59300) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:1260 #18 0x0000561c55df46ac in transformFromClauseItem (pstate=pstate@entry=0x561c5755c350, n=0x561c57561c28, top_rte=top_rte@entry=0x7fff06f59420, top_rti=top_rti@entry=0x7fff06f59410, namespace=namespace@entry=0x7fff06f59430) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:1233 #19 0x0000561c55df46ac in transformFromClauseItem (pstate=pstate@entry=0x561c5755c350, n=0x561c5755b0c8, top_rte=top_rte@entry=0x7fff06f59550, top_rti=top_rti@entry=0x7fff06f59540, namespace=namespace@entry=0x7fff06f59560) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:1233 #20 0x0000561c55df46ac in transformFromClauseItem (pstate=pstate@entry=0x561c5755c350, n=0x561c5755b490, top_rte=top_rte@entry=0x7fff06f59680, top_rti=top_rti@entry=0x7fff06f59670, namespace=namespace@entry=0x7fff06f59690) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:1233 #21 0x0000561c55df46ac in transformFromClauseItem (pstate=pstate@entry=0x561c5755c350, n=0x561c5755b878, top_rte=top_rte@entry=0x7fff06f59720, top_rti=top_rti@entry=0x7fff06f5971c, namespace=namespace@entry=0x7fff06f59728) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:1233 #22 0x0000561c55df6665 in transformFromClause (pstate=pstate@entry=0x561c5755c350, frmList=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/parse_clause.c:132 #23 0x0000561c55dd5962 in transformSelectStmt (stmt=0x561c5755c010, pstate=0x561c5755c350) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/analyze.c:1211 #24 transformStmt (pstate=pstate@entry=0x561c5755c350, parseTree=0x561c5755c010) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/analyze.c:297 #25 0x0000561c55dd7683 in transformOptionalSelectInto (pstate=pstate@entry=0x561c5755c350, parseTree=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/analyze.c:242 #26 0x0000561c55dd76f5 in transformTopLevelStmt (pstate=pstate@entry=0x561c5755c350, parseTree=parseTree@entry=0x561c5755c2d0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/analyze.c:192 #27 0x0000561c55dd7768 in parse_analyze (parseTree=0x561c5755c2d0, sourceText=0x561c5755ff88 "\n\t\tSELECT\n\t\t s.storage,\n\t\t fm.path AS filepath,\n\t\t s.url AS serverurl,\n\t\t cf.title AS type\n\t\tFROM kaltura_file_meta\n\t\tJOIN files fi ON file_id = fi. id\n\t\tJOIN content_format ci on ci.id = fi.format"..., paramTypes=0x0, numParams=0, queryEnv=0x0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/parser/analyze.c:112 #28 0x0000561c55fc928c in pg_analyze_and_rewrite (parsetree=parsetree@entry=0x561c5755c2d0, query_string=query_string@entry=0x561c5755ff88 "\n\t\tSELECT\n\t\t s.storage,\n\t\t fm.path AS filepath,\n\t\t s.url AS serverurl,\n\t\t cf.title AS type\n\t\tFROM kaltura_file_meta\n\t\tJOIN file s fi ON file_id = fi.id\n\t\tJOIN content_format ci on ci.id = fi.format"..., paramTypes=paramTypes@entry=0x0, numParams=numParams@entry=0, queryEnv=queryEnv@entry=0x0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/tcop/postgres.c:653 #29 0x0000561c55fc99e8 in exec_simple_query ( query_string=0x561c5755ff88 "\n\t\tSELECT\n\t\t s.storage,\n\t\t fm.path AS filepath,\n\t\t s.url AS serverurl,\n\t\t cf.title AS type\n\t\tFROM kaltura_file_meta\n\t\tJOIN files fi ON file_id = f i.id\n\t\tJOIN content_format ci on ci.id = fi.format"...) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/tcop/postgres.c:1024 #30 0x0000561c55fcac48 in PostgresMain (argc=<optimized out>, argv=argv@entry=0x561c5750a9f0, dbname=0x561c5750a9d8 "da", username=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/tcop/postgres.c:4088 #31 0x0000561c55d0f16f in BackendRun (port=0x561c57502fe0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/postmaster/postmaster.c:4405 #32 BackendStartup (port=0x561c57502fe0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/postmaster/postmaster.c:4077 #33 ServerLoop () at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/postmaster/postmaster.c:1755 #34 0x0000561c55f5ccae in PostmasterMain (argc=5, argv=<optimized out>) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/postmaster/postmaster.c:1363 #35 0x0000561c55d100c6 in main (argc=5, argv=0x561c574be1f0) at /build/postgresql-10-VFJB0R/postgresql-10-10.4/build/../src/backend/main/main.c:228
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: BUG #15313: Waiting `startup` process on a streaming replica
  2018-08-07 13:35 BUG #15313: Waiting `startup` process on a streaming replica PG Bug reporting form <noreply@postgresql.org>
  2018-08-07 13:40 ` Re: BUG #15313: Waiting `startup` process on a streaming replica Victor Yegorov <vyegorov@gmail.com>
@ 2018-08-07 15:18   ` Maxim Boguk <maxim.boguk@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Maxim Boguk @ 2018-08-07 15:18 UTC (permalink / raw)
  To: Victor Yegorov <vyegorov@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

On Tue, Aug 7, 2018 at 4:40 PM, Victor Yegorov <vyegorov@gmail.com> wrote:

> вт, 7 авг. 2018 г. в 16:36, PG Bug reporting form <noreply@postgresql.org
> >:
>
>>
>> Bug reference:      15313
>> Logged by:          Victor Yegorov
>> Email address:      vyegorov@gmail.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

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-08-07 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 13:35 BUG #15313: Waiting `startup` process on a streaming replica PG Bug reporting form <noreply@postgresql.org>
2018-08-07 13:40 ` Victor Yegorov <vyegorov@gmail.com>
2018-08-07 15:18   ` Maxim Boguk <maxim.boguk@gmail.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