Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQdL3-0004az-Jl for pgsql-committers@arkaria.postgresql.org; Mon, 20 Apr 2020 20:48:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jQdL1-0002yc-BI for pgsql-committers@arkaria.postgresql.org; Mon, 20 Apr 2020 20:48:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQdL1-0002y6-5l for pgsql-committers@lists.postgresql.org; Mon, 20 Apr 2020 20:48:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQdKz-0004Fn-37; Mon, 20 Apr 2020 20:48:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 03KKmGAV027240; Mon, 20 Apr 2020 16:48:16 -0400 From: Tom Lane To: Robert Haas cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Move the server's backup manifest code to a separate file. In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Mon, 20 Apr 2020 18:41:54 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27238.1587415696.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 20 Apr 2020 16:48:16 -0400 Message-ID: <27239.1587415696@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > Move the server's backup manifest code to a separate file. This broke the build for me (with gcc 4.4.7): In file included from basebackup.c:34: ../../../src/include/replication/backup_manifest.h:36: error: redefinition= of typedef 'manifest_info' ../../../src/include/replication/basebackup.h:34: note: previous declarati= on of 'manifest_info' was here make[3]: *** [basebackup.o] Error 1 Not really sure why the buildfarm isn't showing the same. But this in basebackup.h sure looks like an antipattern: struct manifest_info; typedef struct manifest_info manifest_info; The usual thing, if you don't want to actually include the typedef, is more like struct manifest_info; ... extern int64 sendTablespace(char *path, char *oid, bool sizeonly, struct manifest_info *manifest); Also a comment along the lines of "avoid including foo.h" is standard practice. regards, tom lane