From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Move the server's backup manifest code to a separate file.
Date: Mon, 20 Apr 2020 16:48:16 -0400
Message-ID: <27239.1587415696@sss.pgh.pa.us> (raw)
In-Reply-To: <E1jQbMg-0001M1-RR@gemulon.postgresql.org>
References: <E1jQbMg-0001M1-RR@gemulon.postgresql.org>
Robert Haas <rhaas@postgresql.org> 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 declaration 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, rhaas@postgresql.org
Subject: Re: pgsql: Move the server's backup manifest code to a separate file.
In-Reply-To: <27239.1587415696@sss.pgh.pa.us>
References: <E1jQbMg-0001M1-RR@gemulon.postgresql.org> <27239.1587415696@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox