Re: pgsql: Redesign initialization of partition routing structures

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pgsql: Redesign initialization of partition routing structures
Дата
Msg-id 20181116195403.s3q4o7xg3sjfmqmk@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pgsql: Redesign initialization of partition routing structures  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Redesign initialization of partition routing structures  (Andres Freund <andres@anarazel.de>)
Список pgsql-committers
On 2018-Nov-16, Tom Lane wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > Redesign initialization of partition routing structures
> 
> Some of the buildfarm doesn't like this:
> 
> ccache gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -I../../../src/include  -isysroot
/Developer/SDKs/MacOSX10.6.sdk-DCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST   -c -o functioncmds.o
functioncmds.c
> execPartition.c:96: error: redefinition of typedef 'PartitionTupleRouting'
> ../../../src/include/executor/execPartition.h:23: error: previous declaration of 'PartitionTupleRouting' was here
> make[3]: *** [execPartition.o] Error 1

Thanks, I just noticed it and will push this in a minute.  Since I
cannot reproduce the error, it's a blind fix, but seems correct.

diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c
index e3cb4fb1be..ec5628c9c2 100644
--- a/src/backend/executor/execPartition.c
+++ b/src/backend/executor/execPartition.c
@@ -82,7 +82,7 @@
  *        Memory context used to allocate subsidiary structs.
  *-----------------------
  */
-typedef struct PartitionTupleRouting
+struct PartitionTupleRouting
 {
     Relation    partition_root;
     PartitionDispatch *partition_dispatch_info;
@@ -93,7 +93,7 @@ typedef struct PartitionTupleRouting
     int            max_partitions;
     HTAB       *subplan_resultrel_htab;
     MemoryContext memcxt;
-} PartitionTupleRouting;
+};
 
 /*-----------------------
  * PartitionDispatch - information about one partitioned table in a partition

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: pgbench: introduce a RandomState struct
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Avoid re-typedef'ing PartitionTupleRouting