Re: Auto creation of Partitions

From: "Joris Dobbelsteen" <Joris(at)familiedobbelsteen(dot)nl>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "Shane Ambler" <pgsql(at)sheeky(dot)biz>, "NikhilS" <nikkhils(at)gmail(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Subject: Re: Auto creation of Partitions
Date: 2007-03-06 21:54:50
Message-ID: 73427AD314CC364C8DF0FFF9C4D693FF0379BE@nehemiah.joris2k.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

>-----Original Message-----
>From: pgsql-hackers-owner(at)postgresql(dot)org
>[mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Josh Berkus
>Sent: dinsdag 6 maart 2007 19:45
>To: pgsql-hackers(at)postgresql(dot)org
>Cc: Florian G. Pflug; Martijn van Oosterhout; Shane Ambler;
>NikhilS; Peter Eisentraut
>Subject: Re: [HACKERS] Auto creation of Partitions
>
>Florian,
>
>> This sounds like what is really needed is a way to lock a certain
>> condition, namely the existance or non-existance of a record with
>> certain values in certain fields. This would not only help
>this case,
>> it would also help RI triggers, because those wouldn't have
>to acquire
>> a share lock on the referenced rows anymore.
>
>That's called "predicate locking" and it's very, very hard to do.

That's definitely not needed.

Rather something good such that we can finally enforce RI ourselves in
the general case. This is currently not possible to do easily, except in
C code. This means we need to look at all the rows that exists, but are
normally be invisible to our view of the database. Still I'm not sure
about all cases, as the MVCC model is quite tricky and I'm not sure
whether my idea's about it are valid.

The basic idea is that you need to guarentee the constraint for the
'single underlaying model' (with everything visible) and for your view
(under your visibility rules). I believe, but are not certain, that
under these conditions any (valid) snapshot will obey the desired
constraints.

- Joris Dobbelsteen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-03-06 22:27:37 Re: Bug: Buffer cache is not scan resistant
Previous Message David Fetter 2007-03-06 21:27:12 Re: Arrays of Complex Types

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-03-07 01:56:04 Re: Aggressive freezing in lazy-vacuum
Previous Message David Fetter 2007-03-06 21:27:12 Re: Arrays of Complex Types