mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Fix some unportable constructs in parallel pg_dump code.
Didn't compile on semi-obsolete gcc, and probably not on not-gcc-at-all either.
This commit is contained in:
parent
9e257a181c
commit
846681fdd5
@ -44,6 +44,7 @@ typedef void (*on_exit_nicely_callback) (int code, void *arg);
|
||||
|
||||
extern int quote_all_identifiers;
|
||||
extern const char *progname;
|
||||
extern void (*on_exit_msg_func) (const char *modulename, const char *fmt, va_list ap);
|
||||
|
||||
extern void init_parallel_dump_utils(void);
|
||||
extern const char *fmtId(const char *identifier);
|
||||
@ -87,8 +88,6 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
|
||||
extern void
|
||||
exit_horribly(const char *modulename, const char *fmt,...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3), noreturn));
|
||||
extern void (*on_exit_msg_func) (const char *modulename, const char *fmt, va_list ap)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
|
||||
extern void on_exit_nicely(on_exit_nicely_callback function, void *arg);
|
||||
extern void exit_nicely(int code) __attribute__((noreturn));
|
||||
|
||||
|
@ -29,12 +29,6 @@ typedef enum
|
||||
WRKR_FINISHED
|
||||
} T_WorkerStatus;
|
||||
|
||||
typedef enum T_Action
|
||||
{
|
||||
ACT_DUMP,
|
||||
ACT_RESTORE,
|
||||
} T_Action;
|
||||
|
||||
/* Arguments needed for a worker process */
|
||||
typedef struct ParallelArgs
|
||||
{
|
||||
|
@ -114,7 +114,12 @@ struct _tocEntry;
|
||||
struct _restoreList;
|
||||
struct ParallelArgs;
|
||||
struct ParallelState;
|
||||
enum T_Action;
|
||||
|
||||
typedef enum T_Action
|
||||
{
|
||||
ACT_DUMP,
|
||||
ACT_RESTORE
|
||||
} T_Action;
|
||||
|
||||
typedef void (*ClosePtr) (struct _archiveHandle * AH);
|
||||
typedef void (*ReopenPtr) (struct _archiveHandle * AH);
|
||||
@ -145,9 +150,9 @@ typedef void (*DeClonePtr) (struct _archiveHandle * AH);
|
||||
typedef char *(*WorkerJobRestorePtr) (struct _archiveHandle * AH, struct _tocEntry * te);
|
||||
typedef char *(*WorkerJobDumpPtr) (struct _archiveHandle * AH, struct _tocEntry * te);
|
||||
typedef char *(*MasterStartParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te,
|
||||
enum T_Action act);
|
||||
T_Action act);
|
||||
typedef int (*MasterEndParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te,
|
||||
const char *str, enum T_Action act);
|
||||
const char *str, T_Action act);
|
||||
|
||||
typedef size_t (*CustomOutPtr) (struct _archiveHandle * AH, const void *buf, size_t len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user