Re: Auto creation of Partitions - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Auto creation of Partitions
Date
Msg-id 1173448499.3641.274.camel@silverbirch.site
Whole thread Raw
In response to Re: Auto creation of Partitions  ("Luke Lonergan" <LLonergan@greenplum.com>)
List pgsql-hackers
On Fri, 2007-03-09 at 07:40 -0500, Luke Lonergan wrote:

> What happens to the data when the function is dropped or replaced?
> 
Well, that wouldn't happen because you build in a dependency.

I'm not working on this, so don't expect lots of detail. The idea is
essentially to implement things the way SQLServer does it.

The function would need some care. It might even need a function that
writes a function.

e.g. 
CreateRangePartitionFunction('{date1,date2,date3}', funcname);
ReplaceRangePartitionFunction('{date1,date2,date3}', funcname);

which would then give a properly designed function called funcname to be
used for partitioning, which would include tests to make sure a
partition wasn't inadvertently excluded from the list of existing
partitions of any table that used it.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Log levels for checkpoint/bgwriter monitoring
Next
From: "Simon Riggs"
Date:
Subject: Interaction of PITR backups and Bulk operations avoiding WAL