Re: [HACKERS] Hash Functions - Mailing list pgsql-hackers

From David Fetter
Subject Re: [HACKERS] Hash Functions
Date
Msg-id 20170515153418.GA21797@fetter.org
Whole thread Raw
In response to Re: [HACKERS] Hash Functions  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Mon, May 15, 2017 at 07:48:14AM -0700, Jeff Davis wrote:
> This would mean we need to reload through the root as Andres and
> others suggested,

One refinement of this would be to traverse the partition tree,
stopping at the first place where the next branch has hash partitions,
or at any rate types which have no application-level significance, and
load from there.  This could allow for parallelizing where it's
portable to do so.

Level                   Table    Partition Type
------------------------------------------------
Base table:             Log     (N/A)
Next partition:         Year    (range)
Next partition:         Month   (range)
Next partition:         Day     (range) <---- Data gets loaded no lower than here
Next partition:         *       (hash)

That last, any below it, doesn't have a specific name because they're
just an implementation detail, i.e. none has any application-level
meaning.

> and disable a lot of logical partitioning capabilities. I'd be a
> little worried about what we do with attaching/detaching, though.

Attaching and detaching partitions only makes sense for partitions
whose partition keys have application-level meaning anyway.

Does it make sense at this point to separate our partitions into two
categories, those which have can significance to applications, and
those which can't?

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

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Cached plans and statement generalization
Next
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] [POC] hash partitioning