mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +03:00
pgindent run before PG 9.1 beta 1.
This commit is contained in:
@ -88,8 +88,8 @@ const char *progname;
|
||||
static const char *modulename = gettext_noop("archiver");
|
||||
|
||||
/* index array created by fix_dependencies -- only used in parallel restore */
|
||||
static TocEntry **tocsByDumpId; /* index by dumpId - 1 */
|
||||
static DumpId maxDumpId; /* length of above array */
|
||||
static TocEntry **tocsByDumpId; /* index by dumpId - 1 */
|
||||
static DumpId maxDumpId; /* length of above array */
|
||||
|
||||
|
||||
static ArchiveHandle *_allocAH(const char *FileSpec, const ArchiveFormat fmt,
|
||||
@ -1529,7 +1529,6 @@ _moveAfter(ArchiveHandle *AH, TocEntry *pos, TocEntry *te)
|
||||
pos->next->prev = te;
|
||||
pos->next = te;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
@ -1771,7 +1770,7 @@ _discoverArchiveFormat(ArchiveHandle *AH)
|
||||
|
||||
if (AH->fSpec)
|
||||
{
|
||||
struct stat st;
|
||||
struct stat st;
|
||||
|
||||
wantClose = 1;
|
||||
|
||||
@ -1782,6 +1781,7 @@ _discoverArchiveFormat(ArchiveHandle *AH)
|
||||
if (stat(AH->fSpec, &st) == 0 && S_ISDIR(st.st_mode))
|
||||
{
|
||||
char buf[MAXPGPATH];
|
||||
|
||||
if (snprintf(buf, MAXPGPATH, "%s/toc.dat", AH->fSpec) >= MAXPGPATH)
|
||||
die_horribly(AH, modulename, "directory name too long: \"%s\"\n",
|
||||
AH->fSpec);
|
||||
@ -1803,7 +1803,7 @@ _discoverArchiveFormat(ArchiveHandle *AH)
|
||||
#endif
|
||||
die_horribly(AH, modulename, "directory \"%s\" does not appear to be a valid archive (\"toc.dat\" does not exist)\n",
|
||||
AH->fSpec);
|
||||
fh = NULL; /* keep compiler quiet */
|
||||
fh = NULL; /* keep compiler quiet */
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3238,7 +3238,7 @@ dumpTimestamp(ArchiveHandle *AH, const char *msg, time_t tim)
|
||||
*
|
||||
* Work is done in three phases.
|
||||
* First we process all SECTION_PRE_DATA tocEntries, in a single connection,
|
||||
* just as for a standard restore. Second we process the remaining non-ACL
|
||||
* just as for a standard restore. Second we process the remaining non-ACL
|
||||
* steps in parallel worker children (threads on Windows, processes on Unix),
|
||||
* each of which connects separately to the database. Finally we process all
|
||||
* the ACL entries in a single connection (that happens back in
|
||||
@ -3278,9 +3278,9 @@ restore_toc_entries_parallel(ArchiveHandle *AH)
|
||||
* Do all the early stuff in a single connection in the parent. There's no
|
||||
* great point in running it in parallel, in fact it will actually run
|
||||
* faster in a single connection because we avoid all the connection and
|
||||
* setup overhead. Also, pg_dump is not currently very good about
|
||||
* showing all the dependencies of SECTION_PRE_DATA items, so we do not
|
||||
* risk trying to process them out-of-order.
|
||||
* setup overhead. Also, pg_dump is not currently very good about showing
|
||||
* all the dependencies of SECTION_PRE_DATA items, so we do not risk
|
||||
* trying to process them out-of-order.
|
||||
*/
|
||||
skipped_some = false;
|
||||
for (next_work_item = AH->toc->next; next_work_item != AH->toc; next_work_item = next_work_item->next)
|
||||
@ -3967,8 +3967,8 @@ fix_dependencies(ArchiveHandle *AH)
|
||||
|
||||
/*
|
||||
* Count the incoming dependencies for each item. Also, it is possible
|
||||
* that the dependencies list items that are not in the archive at
|
||||
* all. Subtract such items from the depCounts.
|
||||
* that the dependencies list items that are not in the archive at all.
|
||||
* Subtract such items from the depCounts.
|
||||
*/
|
||||
for (te = AH->toc->next; te != AH->toc; te = te->next)
|
||||
{
|
||||
@ -3984,8 +3984,8 @@ fix_dependencies(ArchiveHandle *AH)
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate space for revDeps[] arrays, and reset nRevDeps so we can
|
||||
* use it as a counter below.
|
||||
* Allocate space for revDeps[] arrays, and reset nRevDeps so we can use
|
||||
* it as a counter below.
|
||||
*/
|
||||
for (te = AH->toc->next; te != AH->toc; te = te->next)
|
||||
{
|
||||
@ -3995,8 +3995,8 @@ fix_dependencies(ArchiveHandle *AH)
|
||||
}
|
||||
|
||||
/*
|
||||
* Build the revDeps[] arrays of incoming-dependency dumpIds. This
|
||||
* had better agree with the loops above.
|
||||
* Build the revDeps[] arrays of incoming-dependency dumpIds. This had
|
||||
* better agree with the loops above.
|
||||
*/
|
||||
for (te = AH->toc->next; te != AH->toc; te = te->next)
|
||||
{
|
||||
|
Reference in New Issue
Block a user