From: Shin-ichi MORITA <s-morita@beingcorp.co.jp>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrus <kobruleht2@hot.ee>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7914: pg_dump aborts occasionally
Date: Fri, 09 May 2014 20:18:13 +0900
Message-ID: <536CB975.9050104@beingcorp.co.jp> (raw)
In-Reply-To: <8804.1399507096@sss.pgh.pa.us>
References: <E1UCTUD-0000L3-C1@wrigleys.postgresql.org>
<17113.1362429434@sss.pgh.pa.us>
<2528D0D4784443EB95A0752179B0C0CE@25a038note>
<13236.1362511346@sss.pgh.pa.us>
<D21BF31C50304BEEB86E10C12ED7E1FE@25a038note>
<19324.1362594815@sss.pgh.pa.us>
<8804.1399507096@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Hi Tom,
Thank you for the information.
And I'm sorry for not replying sooner. It took time to recall this issue.
(2014/05/08 8:58), Tom Lane wrote:
> I started thinking about this issue again after seeing a similar report at
> http://www.postgresql.org/message-id/flat/850BF81CE7324F81AF2A44C8660CF2EE@dell2
> and this time I think I see the problem. Look at the loop in pqReadData()
> created by this test:
>
> I've been able to reproduce buffer bloat by inserting some delay into
> this loop (I put "usleep(10000);" in front of the goto above) and then
> sending a steady stream of circa-50KB data messages.
Oh, I'm glad to hear that. Thank you for the explanation.
> exactly the opposite of what generally happens on Unix machines. Perhaps
> Windows schedules differently? Or maybe the reason we're seeing this now,
It might be so. Although I'm not sure why it occurred, I think our
conditions were rare:
Hypervisor: VMware vSphere Hypervisor 5.1
Allocated vCPUs: 1
OS: Windows Server 2012 or 2008R2 (64bit)
Run pg_dump under high load or run pb_dump with the Low priority using
Windows Task Manager
> Anyway, I still don't like your original suggestion of simply skipping
> the pqCheckInBufferSpace call; that's just losing the knowledge we have of
> how big the next message will be. Rather I think what we are missing here
> is that we should deduct the excess space to the left of inStart, and/or
> forcibly left-justify the buffer, before deciding that we need to enlarge
> the buffer. I think it'd be safe for pqCheckInBufferSpace to do that
> (ie move the data within the buffer), though I need to look at the callers
> more closely to be sure.
I agree with you.
The new pqCheckInBufferSpace seems to update inStart, inEnd, and inCursor.
I think it would be OK unless the callers assume they won't be updated.
Thank you.
Shin-ichi
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: s-morita@beingcorp.co.jp, tgl@sss.pgh.pa.us, kobruleht2@hot.ee
Subject: Re: BUG #7914: pg_dump aborts occasionally
In-Reply-To: <536CB975.9050104@beingcorp.co.jp>
References: <E1UCTUD-0000L3-C1@wrigleys.postgresql.org> <17113.1362429434@sss.pgh.pa.us> <2528D0D4784443EB95A0752179B0C0CE@25a038note> <13236.1362511346@sss.pgh.pa.us> <D21BF31C50304BEEB86E10C12ED7E1FE@25a038note> <19324.1362594815@sss.pgh.pa.us> <8804.1399507096@sss.pgh.pa.us> <536CB975.9050104@beingcorp.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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