pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Emmanuel Cecchet <manu@frogthinker.org>
To: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Date: Tue, 16 Dec 2008 03:19:31 -0500
Message-ID: <49476493.1080000@frogthinker.org> (raw)
In-Reply-To: <20081216163936.C016.52131E4D@oss.ntt.co.jp>
References: <20081216153856.C013.52131E4D@oss.ntt.co.jp>
	<494759D0.1090002@frogthinker.org>
	<20081216163936.C016.52131E4D@oss.ntt.co.jp>

ITAGAKI Takahiro wrote:
> The chained triggers would have better flexibilty, and the auto expanding
> trigger would have better usability. I'm not sure about performance
> because expanding child partitions is not always faster than chained
> calls of triggers.
>
> I think chained triggers are hard to maintain. If we drop one of partition
> tables, we need to reconnect the single-linked-list of the triggers.
>   
When you drop one child table, you would also have to drop the trigger 
that has the same name on the parent table.  This does not seem too hard 
but I may be missing something.
>>> server says "INSERT 0 row" though rows are inserted into child tables.
>>>       
>> Technically this is correct since 0 rows were inserted in the parent 
>> table.
>>     
> Yes, but users expect non-0 result normally. Some O/R mapping tools
> also checks the result exactly and raises errors (it could be turned
> off, but default is on).
>   
If the O/R mapping tool is also creating the table it should be aware of 
the semantics specifics to partition. But your comment is well taken, 
this seems counterintuitive and against most API semantics to return 0 
when the number of inserted rows is expected. This would certainly 
require some additional hooks to return the proper value.

Best regards,
Emmanuel
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center
>   

-- 
Emmanuel Cecchet
FTO @ Frog Thinker 
Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: manu@frogthinker.org
Skype: emmanuel_cecchet




view thread (59+ messages)  latest in thread

Message-ID: <49476493.1080000@frogthinker.org>
Permalink:  ../49476493.1080000@frogthinker.org/
Also on:    postgresql.org/message-id/49476493.1080000@frogthinker.org

 · 

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-patches@postgresql.org
  Cc: manu@frogthinker.org, itagaki.takahiro@oss.ntt.co.jp, pgsql-hackers@postgresql.org
  Subject: Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
  In-Reply-To: <49476493.1080000@frogthinker.org>

* 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