Re: [HACKERS] Declarative partitioning - another take

2016-08-17 Thread Ashutosh Bapat
On Wed, Aug 17, 2016 at 11:51 AM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote: > On 2016/08/17 14:33, Ashutosh Bapat wrote: > >> +relid_is_partition(Oid relid) > >> +{ > >> + return SearchSysCacheExists1(PARTRELID, > ObjectIdGetDatum(relid)); > >> +} > >> > >> This is used in a lot

Re: [HACKERS] Declarative partitioning - another take

2016-08-17 Thread Amit Langote
On 2016/08/17 14:33, Ashutosh Bapat wrote: >> +relid_is_partition(Oid relid) >> +{ >> + return SearchSysCacheExists1(PARTRELID, ObjectIdGetDatum(relid)); >> +} >> >> This is used in a lot of places, and the overhead of checking it in >> all of those places is not necessarily nil. Syscache

Re: [HACKERS] Declarative partitioning - another take

2016-08-16 Thread Ashutosh Bapat
> +relid_is_partition(Oid relid) > +{ > + return SearchSysCacheExists1(PARTRELID, ObjectIdGetDatum(relid)); > +} > > This is used in a lot of places, and the overhead of checking it in > all of those places is not necessarily nil. Syscache lookups aren't > free. What if we didn't create a

Re: [HACKERS] Declarative partitioning - another take

2016-08-16 Thread Robert Haas
On Wed, Aug 10, 2016 at 7:09 AM, Amit Langote wrote: > 0003-Catalog-and-DDL-for-partition-bounds.patch > > Partition DDL includes both a way to create new partition and "attach" an > existing table as a partition of parent partitioned table. Attempt to > drop a

Re: [HACKERS] Declarative partitioning - another take

2016-08-16 Thread Robert Haas
On Wed, Aug 10, 2016 at 7:09 AM, Amit Langote wrote: > 0002-psql-and-pg_dump-support-for-partitioned-tables.patch +if (pset.sversion >= 90600 && tableinfo.relkind == 'P') Version check is redundant, right? +) PARTITION BY RANGE ((a+b)); +\d describe_range_key

Re: [HACKERS] Declarative partitioning - another take

2016-08-16 Thread Robert Eckhardt
On Tue, Aug 16, 2016 at 2:30 AM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > > > > >> I think it makes sense to keep calling it a table because it has all the >> logical properties of a table even though it will differ from a regular >> table on the basis of physical implementation

Re: [HACKERS] Declarative partitioning - another take

2016-08-16 Thread Ashutosh Bapat
> I think it makes sense to keep calling it a table because it has all the > logical properties of a table even though it will differ from a regular > table on the basis of physical implementation details such as that it does > not own physical storage. Am I missing something? > > > > > +

Re: [HACKERS] Declarative partitioning - another take

2016-08-15 Thread Amit Langote
Thanks a lot for taking a look at this. On 2016/08/11 3:22, Robert Haas wrote: > On Wed, Aug 10, 2016 at 7:09 AM, Amit Langote > wrote: >> Attached is the latest set of patches to implement declarative >> partitioning. > > Cool. I would encourage you to give

Re: [HACKERS] Declarative partitioning - another take

2016-08-10 Thread Robert Haas
On Wed, Aug 10, 2016 at 7:09 AM, Amit Langote wrote: > Attached is the latest set of patches to implement declarative > partitioning. Cool. I would encourage you to give some thought to what is the least committable subset of these patches, and think about whether

<    1   2   3   4