Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WaNQW-0002E4-C5 for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Apr 2014 10:50:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WaNQV-00054B-6N for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Apr 2014 10:50:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WaNQU-000544-5H for pgsql-bugs@postgresql.org; Wed, 16 Apr 2014 10:50:46 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WaNQP-00009x-OH for pgsql-bugs@postgresql.org; Wed, 16 Apr 2014 10:50:44 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 420B72815E; Wed, 16 Apr 2014 03:50:38 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 385DCB262D; Wed, 16 Apr 2014 03:50:38 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 9EB85120032; Wed, 16 Apr 2014 03:50:30 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Wed, 16 Apr 2014 03:50:29 -0700 (PDT) Message-ID: <534E607B.8050502@vmware.com> Date: Wed, 16 Apr 2014 13:50:35 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 MIME-Version: 1.0 To: "digoal@126.com" , pgsql-bugs Subject: Re: BUG #10013: PostgreSQL 9.4 initdb FATAL: could not write to file "pg_xlog/xlogtemp.3590": No space left on devi References: <20140414014442.15385.74268@wrigleys.postgresql.org>, <534E3222.609@vmware.com> <201404161620172127337@126.com> In-Reply-To: <201404161620172127337@126.com> Content-Type: multipart/mixed; boundary="------------090309050607060704090406" X-Pg-Spam-Score: -7.6 (-------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is a multi-part message in MIME format. --------------090309050607060704090406 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------090309050607060704090406 Content-Type: text/x-diff; name="morelogging-in-xlogfileinit.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="morelogging-in-xlogfileinit.patch" 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 */ --------------090309050607060704090406 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs --------------090309050607060704090406--