From: | Steve Singer <steve(at)ssinger(dot)info> |
---|---|
To: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | CREATE REPLICATION SLOT fails on a timeout |
Date: | 2014-05-16 20:37:16 |
Message-ID: | BLU0-SMTP73A5611C8360209F7D6A56DC310@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I am finding that my logical walsender connections are being terminated
due to a timeout on the CREATE REPLICATION SLOT command. with
"terminating walsender process due to replication timeout"
Below is the stack trace when this happens
#3 0x000000000067df28 in WalSndCheckTimeOut
(now=now(at)entry=453585463823871) at walsender.c:1748
#4 0x000000000067eedc in WalSndWaitForWal (loc=691727888) at
walsender.c:1216
#5 logical_read_xlog_page (state=<optimized out>,
targetPagePtr=691724288, reqLen=<optimized out>,
targetRecPtr=<optimized out>, cur_page=0x18476e0 "}\320\005",
pageTLI=<optimized out>) at walsender.c:741
#6 0x00000000004f41bf in ReadPageInternal (state=state(at)entry=0x17aa140,
pageptr=pageptr(at)entry=691724288,
reqLen=reqLen(at)entry=3600) at xlogreader.c:525
#7 0x00000000004f454a in XLogReadRecord (state=0x17aa140,
RecPtr=691727856, RecPtr(at)entry=0,
errormsg=errormsg(at)entry=0x7fff7f668c28) at xlogreader.c:228
#8 0x0000000000675e5c in DecodingContextFindStartpoint
(ctx=ctx(at)entry=0x17a0358) at logical.c:460
#9 0x0000000000680f16 in CreateReplicationSlot (cmd=0x1798b50) at
walsender.c:800
#10 exec_replication_command (
cmd_string=cmd_string(at)entry=0x17f1478 "CREATE_REPLICATION_SLOT
\"slon_4_1\" LOGICAL \"slony1_funcs.2.2.0\"")
at walsender.c:1291
#11 0x00000000006bf4a1 in PostgresMain (argc=<optimized out>,
argv=argv(at)entry=0x177db50, dbname=0x177db30 "test1",
(gdb) p last_reply_timestamp
$1 = 0
I propose the attached patch sets last_reply_timestamp to now() it
starts processing a command. Since receiving a command is hearing
something from the client.
Steve
Attachment | Content-Type | Size |
---|---|---|
timeout_init.diff | text/x-patch | 463 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-05-16 20:43:31 | Re: CREATE REPLICATION SLOT fails on a timeout |
Previous Message | Andres Freund | 2014-05-16 20:30:59 | Re: %d in log_line_prefix doesn't work for bg/autovacuum workers |