pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dale Gallagher <dale.gallagher@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Strange behaviour: create database hangs (v 8.4.4)
Date: Mon, 31 May 2010 12:59:34 -0400
Message-ID: <14831.1275325174@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTilsKP5ik1vMKHApdE4J7_CF7XLR4eqGTPN6sRPC@mail.gmail.com>
References: <AANLkTinrjvDOQAWcU3MYWPdEiEMR6QfuLydGfX-lMSOu@mail.gmail.com>
	<AANLkTimtPtGKaa7ViHc2KT_Gk4H6dTU4pFn8JKiQDqEE@mail.gmail.com>
	<AANLkTilsKP5ik1vMKHApdE4J7_CF7XLR4eqGTPN6sRPC@mail.gmail.com>

Dale Gallagher <dale.gallagher@gmail.com> writes:
> On 31 May 2010 13:10, Dale Gallagher <dale.gallagher@gmail.com> wrote:
>> I am now using strace on postgres startup and watching the filesystem
>> during the creation of the database. So far, it seems that files in
>> PGHOME/base/1234/ are appearing, but VERY slowly. Thus far it's taken
>> 7 minutes and 92 files have been created. The command has not
>> completed within psql....
>> 
>> Could this be a filesystem corruption issue? The host is using ext4.

> The command finally completed. It took a VERY long time. Something is
> wrong, but I have no clue what.

Seems like you must have a kernel/filesystem issue, but I don't know
what either.  CREATE DATABASE just copies the contents of template1
using some absolutely straightforward code (look into src/port/copydir.c)
so it's entirely filesystem-limited.

You could try tracing the backend that's doing the command with
"strace -r -p <pid>" to try to get an idea of which system calls
are eating all the time.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <14831.1275325174@sss.pgh.pa.us>
Permalink:  ../14831.1275325174@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14831.1275325174@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dale.gallagher@gmail.com
  Subject: Re: Strange behaviour: create database hangs (v 8.4.4)
  In-Reply-To: <14831.1275325174@sss.pgh.pa.us>

* 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