create of partition table slow

From: Anj Adu <fotographs(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: create of partition table slow
Date: 2009-07-27 22:05:40
Message-ID: f2fd819a0907271505m177463dfl2f099774e6b82cf7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Why does the following statement take very long

create table child_table_2009_08_01(check (datefield >= '2009-08-01
00:00:00' and datefield < '2009-08-02 00:00:00')) inherits
(parent_table)

Note that this is the first partition for the month of August.
Subsequent partitions are created very quickly.

There are about 15 existing partitions already present for the parent
table. I would expect create table to be lightning fast...is there
more to the create partitioned table than meets the eye.

There are no concurrent accesses to the table. I disable all remote
and local connections so that only the create partitions script runs.

Postgres version 8.1.2 running on Dell 2850 Raid 10(4x300G disks)
RHEL 3 2.4.21-37.ELsmp

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Kempter 2009-07-28 03:33:21 force varchar column to be lowercase
Previous Message Carol Walter 2009-07-27 17:08:10 Re: Cannot connect to postgresql - Problem solved - Why / How?