Re: Strange behaviour: create database hangs (v 8.4.4)

From: Jeremy Tunnell <jeremy(dot)tunnell(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Strange behaviour: create database hangs (v 8.4.4)
Date: 2010-06-01 00:50:16
Message-ID: AANLkTikMs6tBXi5uWGKgLNhkPMdJJb7xzmEG8R6EkuKU@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

unregister

On Mon, May 31, 2010 at 9:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Dale Gallagher <dale(dot)gallagher(at)gmail(dot)com> writes:
>> On 31 May 2010 13:10, Dale Gallagher <dale(dot)gallagher(at)gmail(dot)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
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tena Sakai 2010-06-01 01:36:41 Re: What is field separator?
Previous Message Tom Lane 2010-05-31 16:59:34 Re: Strange behaviour: create database hangs (v 8.4.4)