diff options
Diffstat (limited to 'src/bin/pg_dump')
-rw-r--r-- | src/bin/pg_dump/parallel.c | 14 | ||||
-rw-r--r-- | src/bin/pg_dump/parallel.h | 4 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.c | 2 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.h | 4 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 18 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dump.h | 2 |
6 files changed, 21 insertions, 23 deletions
diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c index ae0d329ea21..f005686d8d5 100644 --- a/src/bin/pg_dump/parallel.c +++ b/src/bin/pg_dump/parallel.c @@ -110,9 +110,9 @@ static char *readMessageFromPipe(int fd); #ifdef WIN32 static void shutdown_parallel_dump_utils(int code, void *unused); -bool parallel_init_done = false; +bool parallel_init_done = false; static DWORD tls_index; -DWORD mainThreadId; +DWORD mainThreadId; #endif @@ -1141,7 +1141,6 @@ select_loop(int maxFd, fd_set *workerset) if (i) break; } - #else /* UNIX */ for (;;) @@ -1163,7 +1162,6 @@ select_loop(int maxFd, fd_set *workerset) continue; break; } - #endif return i; @@ -1330,7 +1328,7 @@ pgpipe(int handles[2]) serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(0); serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - if (bind(s, (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR) + if (bind(s, (SOCKADDR *) &serv_addr, len) == SOCKET_ERROR) { write_msg(modulename, "pgpipe could not bind: %ui", WSAGetLastError()); @@ -1344,7 +1342,7 @@ pgpipe(int handles[2]) closesocket(s); return -1; } - if (getsockname(s, (SOCKADDR *) & serv_addr, &len) == SOCKET_ERROR) + if (getsockname(s, (SOCKADDR *) &serv_addr, &len) == SOCKET_ERROR) { write_msg(modulename, "pgpipe could not getsockname: %ui", WSAGetLastError()); @@ -1359,14 +1357,14 @@ pgpipe(int handles[2]) return -1; } - if (connect(handles[1], (SOCKADDR *) & serv_addr, len) == SOCKET_ERROR) + if (connect(handles[1], (SOCKADDR *) &serv_addr, len) == SOCKET_ERROR) { write_msg(modulename, "pgpipe could not connect socket: %ui", WSAGetLastError()); closesocket(s); return -1; } - if ((handles[0] = accept(s, (SOCKADDR *) & serv_addr, &len)) == INVALID_SOCKET) + if ((handles[0] = accept(s, (SOCKADDR *) &serv_addr, &len)) == INVALID_SOCKET) { write_msg(modulename, "pgpipe could not accept socket: %ui", WSAGetLastError()); diff --git a/src/bin/pg_dump/parallel.h b/src/bin/pg_dump/parallel.h index a7caa6cdbef..dacd696edca 100644 --- a/src/bin/pg_dump/parallel.h +++ b/src/bin/pg_dump/parallel.h @@ -30,14 +30,14 @@ typedef enum WRKR_IDLE, WRKR_WORKING, WRKR_FINISHED -} T_WorkerStatus; +} T_WorkerStatus; /* Arguments needed for a worker process */ typedef struct ParallelArgs { struct _archiveHandle *AH; struct _tocEntry *te; -} ParallelArgs; +} ParallelArgs; /* State for each parallel activity slot */ typedef struct ParallelSlot diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index d202b422203..a720afb72cc 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -3812,7 +3812,7 @@ get_next_work_item(ArchiveHandle *AH, TocEntry *ready_list, * our work is finished, the master process will assign us a new work item. */ int -parallel_restore(ParallelArgs * args) +parallel_restore(ParallelArgs *args) { ArchiveHandle *AH = args->AH; TocEntry *te = args->te; diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index 59af815802e..25aa158e5da 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -152,7 +152,7 @@ typedef char *(*WorkerJobDumpPtr) (struct _archiveHandle * AH, struct _tocEntry typedef char *(*MasterStartParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te, T_Action act); typedef int (*MasterEndParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te, - const char *str, T_Action act); + const char *str, T_Action act); typedef size_t (*CustomOutPtr) (struct _archiveHandle * AH, const void *buf, size_t len); @@ -360,7 +360,7 @@ typedef struct _tocEntry int nLockDeps; /* number of such dependencies */ } TocEntry; -extern int parallel_restore(struct ParallelArgs * args); +extern int parallel_restore(struct ParallelArgs *args); extern void on_exit_close_archive(Archive *AHX); extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt,...) __attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4))); diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 76628fcbc39..ec956adc0f1 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -675,8 +675,8 @@ main(int argc, char **argv) if (numWorkers > 1 && fout->remoteVersion < 90200 && !no_synchronized_snapshots) exit_horribly(NULL, - "Synchronized snapshots are not supported by this server version.\n" - "Run with --no-synchronized-snapshots instead if you do not need\n" + "Synchronized snapshots are not supported by this server version.\n" + "Run with --no-synchronized-snapshots instead if you do not need\n" "synchronized snapshots.\n"); /* Find the last built-in OID, if needed */ @@ -13098,8 +13098,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) appendPQExpBuffer(q, "\nOPTIONS (\n %s\n)", ftoptions); /* - * For materialized views, create the AS clause just like a view. - * At this point, we always mark the view as not populated. + * For materialized views, create the AS clause just like a view. At + * this point, we always mark the view as not populated. */ if (tbinfo->relkind == RELKIND_MATVIEW) { @@ -14663,7 +14663,7 @@ getExtensionMembership(Archive *fout, ExtensionInfo extinfo[], /* check table explicitly requested */ if (table_include_oids.head != NULL && simple_oid_list_member(&table_include_oids, - configtbloid)) + configtbloid)) dumpobj = true; /* check table's schema explicitly requested */ @@ -14674,19 +14674,19 @@ getExtensionMembership(Archive *fout, ExtensionInfo extinfo[], /* check table excluded by an exclusion switch */ if (table_exclude_oids.head != NULL && simple_oid_list_member(&table_exclude_oids, - configtbloid)) + configtbloid)) dumpobj = false; /* check schema excluded by an exclusion switch */ if (simple_oid_list_member(&schema_exclude_oids, - configtbl->dobj.namespace->dobj.catId.oid)) + configtbl->dobj.namespace->dobj.catId.oid)) dumpobj = false; if (dumpobj) { /* - * Note: config tables are dumped without OIDs regardless of - * the --oids setting. This is because row filtering + * Note: config tables are dumped without OIDs regardless + * of the --oids setting. This is because row filtering * conditions aren't compatible with dumping OIDs. */ makeTableDataInfo(configtbl, false); diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index 6352adaa05e..55825386ea3 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -236,7 +236,7 @@ typedef struct _tableInfo char *relacl; char relkind; char relpersistence; /* relation persistence */ - bool relispopulated; /* relation is populated */ + bool relispopulated; /* relation is populated */ char *reltablespace; /* relation tablespace */ char *reloptions; /* options specified by WITH (...) */ char *toast_reloptions; /* ditto, for the TOAST table */ |