On 2016/12/08 3:20, Robert Haas wrote: > On Wed, Dec 7, 2016 at 11:53 AM, Erik Rijkers <e...@xs4all.nl> wrote: >>> My bad. The fix I sent last night for one of the cache flush issues >>> wasn't quite right. The attached seems to fix it. >> Yes, fixed here too. Thanks. > > Thanks for the report - that was a good catch. > > I've committed 0001 - 0006 with that correction and a few other > adjustments. There's plenty of room for improvement here, and almost > certainly some straight-up bugs too, but I think we're at a point > where it will be easier and less error-prone to commit follow on > changes incrementally rather than by continuously re-reviewing a very > large patch set for increasingly smaller changes.
Attached is a patch to fix some stale comments in the code and a minor correction to one of the examples on the CREATE TABLE page. Thanks, Amit
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 8bf8af302b..bb6cffabf7 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -1498,7 +1498,7 @@ CREATE TABLE cities ( <programlisting> CREATE TABLE measurement_y2016m07 PARTITION OF measurement ( - unitsales WITH OPTIONS DEFAULT 0 + unitsales DEFAULT 0 ) FOR VALUES FROM ('2016-07-01') TO ('2016-08-01'); </programlisting></para> diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index 6dab45f0ed..441b31c46e 100644 --- a/src/backend/catalog/partition.c +++ b/src/backend/catalog/partition.c @@ -1492,7 +1492,7 @@ generate_partition_qual(Relation rel, bool recurse) * Construct values[] and isnull[] arrays for the partition key * of a tuple. * - * pkinfo partition key execution info + * pd Partition dispatch object of the partitioned table * slot Heap tuple from which to extract partition key * estate executor state for evaluating any partition key * expressions (must be non-NULL) diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 270be0af18..2d2d383941 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -1403,10 +1403,7 @@ BeginCopy(ParseState *pstate, errmsg("table \"%s\" does not have OIDs", RelationGetRelationName(cstate->rel)))); - /* - * Initialize state for CopyFrom tuple routing. Watch out for - * any foreign partitions. - */ + /* Initialize state for CopyFrom tuple routing. */ if (is_from && rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) { PartitionDispatch *pd; diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index c77b216d4f..917795af9c 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -1614,8 +1614,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, /* * In case of a partition, there are no new column definitions, only - * dummy ColumnDefs created for column constraints. We merge these - * constraints inherited from the parent. + * dummy ColumnDefs created for column constraints. We merge them + * with the constraints inherited from the parent. */ if (is_partition) { @@ -2030,8 +2030,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, newcollid; /* - * Partitions have only one parent, so conflict should never - * occur + * Partitions have only one parent and have no column + * definitions of their own, so conflict should never occur. */ Assert(!is_partition); @@ -2118,8 +2118,8 @@ MergeAttributes(List *schema, List *supers, char relpersistence, /* * Now that we have the column definition list for a partition, we can - * check whether the columns referenced in column option specifications - * actually exist. Also, we merge the options into the corresponding + * check whether the columns referenced in the column constraint specs + * actually exist. Also, we merge the constraints into the corresponding * column definitions. */ if (is_partition && list_length(saved_schema) > 0) diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h index cec54ae62e..be8727b556 100644 --- a/src/include/catalog/pg_partitioned_table.h +++ b/src/include/catalog/pg_partitioned_table.h @@ -47,7 +47,7 @@ CATALOG(pg_partitioned_table,3350) BKI_WITHOUT_OIDS #ifdef CATALOG_VARLEN oidvector partclass; /* operator class to compare keys */ oidvector partcollation; /* user-specified collation for keys */ - pg_node_tree partexprs; /* list of expressions in the partitioning + pg_node_tree partexprs; /* list of expressions in the partition * key; one item for each zero entry in * partattrs[] */ #endif
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers