Re: Partitioning (Was: Foreign Key to an (abstract?) Parent Table)

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Alessandro Gagliardi <alessandro(at)path(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Partitioning (Was: Foreign Key to an (abstract?) Parent Table)
Date: 2012-02-21 23:28:48
Message-ID: 4F4428B0.4070106@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 02/21/2012 03:08 PM, Alessandro Gagliardi wrote:
> That is, indeed, where I started. The fact that it does not show how
> to automatically generate new partitions makes it somewhat....

This is probably because automatically creating new partitions in a
query or trigger is not considered a good idea as it can lead to
unfortunate locking and performance problems when multiple processes all
simultaneously decide they need a new partition and attempt to create it.

Pre-create your partitions through a separate process. A simple
cron-script can handle this for you.

Cheers,
Steve

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Struckhoff, Kevin 2012-02-21 23:34:36 psql think we should be on port 5432
Previous Message Alessandro Gagliardi 2012-02-21 23:08:17 Re: Partitioning (Was: Foreign Key to an (abstract?) Parent Table)