Re: RangeType internal use

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: RangeType internal use
Дата
Msg-id 20150210200442.GB1952@fetter.org
обсуждение исходный текст
Ответ на Re: RangeType internal use  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: RangeType internal use  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
On Mon, Feb 09, 2015 at 12:37:05PM -0500, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Mon, Feb 9, 2015 at 10:36 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> It's going to be complicated and probably buggy, and I think it is heading
> >> in the wrong direction altogether.  If you want to partition in some
> >> arbitrary complicated fashion that the system can't reason about very
> >> effectively, we *already have that*.  IMO the entire point of building
> >> a new partitioning infrastructure is to build something simple, reliable,
> >> and a whole lot faster than what you can get from inheritance
> >> relationships.  And "faster" is going to come mainly from making the
> >> partitioning rules as simple as possible, not as complex as possible.
> 
> > Yeah, but people expect to be able to partition on ranges that are not
> > all of equal width.  I think any proposal that we shouldn't support
> > that is the kiss of death for a feature like this - it will be so
> > restricted as to eliminate 75% of the use cases.
> 
> Well, that's debatable IMO (especially your claim that variable-size
> partitions would be needed by a majority of users).

It's ubiquitous.

Time range partition sets almost always have some sets with finite
range and at least one range with infinity in it: "current end" to
infinity, and somewhat less frequently in my experience, -infinity to
some arbitrary start.

> But in any case, partitioning behavior that is emergent from a bunch
> of independent pieces of information scattered among N tables seems
> absolutely untenable from where I sit.

Agreed.

> Whatever we support, the behavior needs to be described by *one*
> chunk of information --- a sorted list of bin bounding values,
> perhaps.

This would work for some interesting generalization of "sorted."

Maybe going back to the mathematical definition of "partition" could
bear more fruit.  All that's needed for that is an equivalence
relation, however it's denoted.  In practical terms, you'd need to
have a quick way to enumerate the equivalence classes and another to
establish whether equivalence holds.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Manipulating complex types as non-contiguous structures in-memory
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0