Re: Auto creation of Partitions
От
Alvaro Herrera
Тема
Re: Auto creation of Partitions
Дата
Msg-id
20070307145832.GA21435@alvh.no-ip.org
Ответ на
Re: Auto creation of Partitions (NikhilS)
Список
Дерево обсуждения
Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions Peter Eisentraut <peter_e@gmx.net>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions "Simon Riggs" <simon@2ndquadrant.com>
Re: Auto creation of Partitions Jim Nasby <decibel@decibel.org>
Re: Auto creation of Partitions "Simon Riggs" <simon@2ndquadrant.com>
Re: Auto creation of Partitions Gregory Stark <stark@enterprisedb.com>
Re: Auto creation of Partitions "Jim C. Nasby" <jim@nasby.net>
Re: Auto creation of Partitions "Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>
Re: Auto creation of Partitions "Luke Lonergan" <llonergan@greenplum.com>
Re: Auto creation of Partitions "Simon Riggs" <simon@2ndquadrant.com>
Re: Auto creation of Partitions "Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>
Re: Auto creation of Partitions "Luke Lonergan" <llonergan@greenplum.com>
Re: Auto creation of Partitions "Simon Riggs" <simon@2ndquadrant.com>
Re: Auto creation of Partitions Shane Ambler <pgsql@Sheeky.Biz>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions "Simon Riggs" <simon@2ndquadrant.com>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions Peter Eisentraut <peter_e@gmx.net>
Re: Auto creation of Partitions Tom Lane <tgl@sss.pgh.pa.us>
Re: Auto creation of Partitions Josh Berkus <josh@agliodbs.com>
Re: Auto creation of Partitions Andrew Dunstan <andrew@dunslane.net>
Re: Auto creation of Partitions Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
Re: Auto creation of Partitions "Joshua D. Drake" <jd@commandprompt.com>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions Peter Eisentraut <peter_e@gmx.net>
Re: Auto creation of Partitions Shane Ambler <pgsql@Sheeky.Biz>
Re: Auto creation of Partitions Martijn van Oosterhout <kleptog@svana.org>
Re: Auto creation of Partitions "Florian G. Pflug" <fgp@phlo.org>
Re: Auto creation of Partitions Josh Berkus <josh@agliodbs.com>
Re: Auto creation of Partitions Jim Nasby <decibel@decibel.org>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions "Jim C. Nasby" <jim@nasby.net>
Re: Auto creation of Partitions Shane Ambler <pgsql@Sheeky.Biz>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions Robert Treat <xzilla@users.sourceforge.net>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions Robert Treat <xzilla@users.sourceforge.net>
Re: Auto creation of Partitions "Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>
Re: Auto creation of Partitions Jim Nasby <jim@nasby.net>
Re: Auto creation of Partitions Hannu Krosing <hannu@skype.net>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions Gregory Stark <stark@enterprisedb.com>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions "Zeugswetter Andreas ADI SD" <ZeugswetterA@spardat.at>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions Alvaro Herrera <alvherre@commandprompt.com>
Re: Auto creation of Partitions NikhilS <nikkhils@gmail.com>
Re: Auto creation of Partitions "Jim C. Nasby" <jim@nasby.net>
Re: Auto creation of Partitions Jim Nasby <decibel@decibel.org>
I am wondering if we can implement unique indexes across several tables (inheritance hierarchy) not by using a single, big index covering all the tables, but rather by inserting a dummy entry into each partition's unique index. This dummy entry would have an expanded CTID which would include the tableoid, so it's possible to check it (albeit there is a problem in that we may require the opening of another heap to do the actual checking). These dummy entries could be removed by bulkcleanup as soon as the inserting transaction is no longer running, to avoid bloating the index too much. All said dummy index entries would be located at either the rightmost or the leftmost leaf, or close to it, so another idea is to have future inserters reuse the entry for a different key. The obvious problem with this is, naturally, the excess I/O that extra index traversing causes. The not so obvious ones are locking, deadlocking and the opening of other heaps and indexes while you do the insertion, which may be too expensive. On the other hand, maybe this idea is easier to implement than full-fledged cross-table indexes, so we could have richer partitioning earlier than when somebody finally bites the bullet and implements cross-table indexes. Or maybe this is just a dumb idea, but I had to let it out anyway :-) -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-hackers по дате отправления