pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: digoal@126.com <digoal@126.com>
To: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #10013: PostgreSQL 9.4 initdb FATAL: could not write to file "pg_xlog/xlogtemp.3590": No space left on devi
Date: Wed, 16 Apr 2014 13:50:35 +0300
Message-ID: <534E607B.8050502@vmware.com> (raw)
In-Reply-To: <201404161620172127337@126.com>
References: <20140414014442.15385.74268@wrigleys.postgresql.org>
	<534E3222.609@vmware.com>
	<201404161620172127337@126.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 04/16/2014 11:20 AM, digoal@126.com wrote:
> HI,
>     I can reproduce this.

Ok. Can you try with the attached patch applied, please?

- Heikki

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachments:

morelogging-in-xlogfileinit.patch (text/x-diff, 744B) download diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 0106cdf..f95f12f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -3142,11 +3142,15 @@ XLogFileInit(XLogSegNo logsegno, bool *use_existent, bool use_lock) memset(zbuffer, 0, XLOG_BLCKSZ); for (nbytes = 0; nbytes < XLogSegSize; nbytes += XLOG_BLCKSZ) { + int len; + errno = 0; - if ((int) write(fd, zbuffer, XLOG_BLCKSZ) != (int) XLOG_BLCKSZ) + if ((int) (len = write(fd, zbuffer, XLOG_BLCKSZ)) != (int) XLOG_BLCKSZ) { int save_errno = errno; + elog(LOG, "write() in XLogFileInit returned %d: %m", len); + /* * If we fail to make the file, delete it to release disk space */

view thread (15+ messages)  latest in thread

Message-ID: <534E607B.8050502@vmware.com>
Permalink:  ../534E607B.8050502@vmware.com/
Also on:    postgresql.org/message-id/534E607B.8050502@vmware.com

 ·  · 

reply

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: hlinnakangas@vmware.com, digoal@126.com
  Subject: Re: BUG #10013: PostgreSQL 9.4 initdb FATAL: could not write to file "pg_xlog/xlogtemp.3590": No space left on devi
  In-Reply-To: <534E607B.8050502@vmware.com>
  References: <20140414014442.15385.74268@wrigleys.postgresql.org> <534E3222.609@vmware.com> <201404161620172127337@126.com> <534E607B.8050502@vmware.com>

* 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