From: | Matteo Beccati <php(at)beccati(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Errors on CREATE TABLE IF NOT EXISTS |
Date: | 2012-05-02 17:08:18 |
Message-ID: | 4FA16A02.10109@beccati.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi Alvaro,
On 01/05/2012 21:36, Alvaro Herrera wrote:
> The question you were asking has already been answered, but I think it's
> worth pointing out that a partitioned-insert trigger that has to check
> whether the partition exist beforehand is a lot slower than one that
> doesn't have to. Our usual suggestion is to create the partitions by
> some other means, e.g. create a couple months worth of weekly
> partitions, a couple of months ahead of time, via cron. The insert
> trigger is then assured that the partition exists, and it can become
> faster by not having to check.
Thanks for the suggestion. I will surely follow the advice as soon as
the load starts to grow. For now catching the "table not found"
exception within the insert trigger and creating the table on the fly
seems a good balance between performance and ease of use.
Cheers
--
Matteo Beccati
Development & Consulting - http://www.beccati.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2012-05-02 18:21:10 | Re: BUG #6624: Tab completion of identifier containing single backslash triggers warnings |
Previous Message | stuart | 2012-05-02 12:59:58 | BUG #6624: Tab completion of identifier containing single backslash triggers warnings |