Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff3a7f0

Browse files
Remove unused function parameters in pg_backup_archiver.c.
Thanks to commit9c02e3a, which modified some of the changesfrom commita0a4601, we can remove the now-unused ArchiveHandleparameter from _tocEntryRestorePass() and move_to_ready_heap().Reviewed-by: Jeff Davis <pgsql@j-davis.com>Discussion:https://postgr.es/m/Z-3x2AnPCP331JA3%40nathan
1 parent9c02e3a commitff3a7f0

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static void processEncodingEntry(ArchiveHandle *AH, TocEntry *te);
7272
staticvoidprocessStdStringsEntry(ArchiveHandle*AH,TocEntry*te);
7373
staticvoidprocessSearchPathEntry(ArchiveHandle*AH,TocEntry*te);
7474
staticint_tocEntryRequired(TocEntry*te,teSectioncurSection,ArchiveHandle*AH);
75-
staticRestorePass_tocEntryRestorePass(ArchiveHandle*AH,TocEntry*te);
75+
staticRestorePass_tocEntryRestorePass(TocEntry*te);
7676
staticbool_tocEntryIsACL(TocEntry*te);
7777
staticvoid_disableTriggersIfNecessary(ArchiveHandle*AH,TocEntry*te);
7878
staticvoid_enableTriggersIfNecessary(ArchiveHandle*AH,TocEntry*te);
@@ -102,8 +102,7 @@ static void pending_list_append(TocEntry *l, TocEntry *te);
102102
staticvoidpending_list_remove(TocEntry*te);
103103
staticintTocEntrySizeCompareQsort(constvoid*p1,constvoid*p2);
104104
staticintTocEntrySizeCompareBinaryheap(void*p1,void*p2,void*arg);
105-
staticvoidmove_to_ready_heap(ArchiveHandle*AH,
106-
TocEntry*pending_list,
105+
staticvoidmove_to_ready_heap(TocEntry*pending_list,
107106
binaryheap*ready_heap,
108107
RestorePasspass);
109108
staticTocEntry*pop_next_work_item(binaryheap*ready_heap,
@@ -749,7 +748,7 @@ RestoreArchive(Archive *AHX)
749748
if ((te->reqs& (REQ_SCHEMA |REQ_DATA |REQ_STATS))==0)
750749
continue;/* ignore if not to be dumped at all */
751750

752-
switch (_tocEntryRestorePass(AH,te))
751+
switch (_tocEntryRestorePass(te))
753752
{
754753
caseRESTORE_PASS_MAIN:
755754
(void)restore_toc_entry(AH,te, false);
@@ -768,7 +767,7 @@ RestoreArchive(Archive *AHX)
768767
for (te=AH->toc->next;te!=AH->toc;te=te->next)
769768
{
770769
if ((te->reqs& (REQ_SCHEMA |REQ_DATA |REQ_STATS))!=0&&
771-
_tocEntryRestorePass(AH,te)==RESTORE_PASS_ACL)
770+
_tocEntryRestorePass(te)==RESTORE_PASS_ACL)
772771
(void)restore_toc_entry(AH,te, false);
773772
}
774773
}
@@ -778,7 +777,7 @@ RestoreArchive(Archive *AHX)
778777
for (te=AH->toc->next;te!=AH->toc;te=te->next)
779778
{
780779
if ((te->reqs& (REQ_SCHEMA |REQ_DATA |REQ_STATS))!=0&&
781-
_tocEntryRestorePass(AH,te)==RESTORE_PASS_POST_ACL)
780+
_tocEntryRestorePass(te)==RESTORE_PASS_POST_ACL)
782781
(void)restore_toc_entry(AH,te, false);
783782
}
784783
}
@@ -3261,7 +3260,7 @@ _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH)
32613260
* See notes with the RestorePass typedef in pg_backup_archiver.h.
32623261
*/
32633262
staticRestorePass
3264-
_tocEntryRestorePass(ArchiveHandle*AH,TocEntry*te)
3263+
_tocEntryRestorePass(TocEntry*te)
32653264
{
32663265
/* "ACL LANGUAGE" was a crock emitted only in PG 7.4 */
32673266
if (strcmp(te->desc,"ACL")==0||
@@ -4342,7 +4341,7 @@ restore_toc_entries_prefork(ArchiveHandle *AH, TocEntry *pending_list)
43424341
* not set skipped_some in this case, since by assumption no main-pass
43434342
* items could depend on these.
43444343
*/
4345-
if (_tocEntryRestorePass(AH,next_work_item)!=RESTORE_PASS_MAIN)
4344+
if (_tocEntryRestorePass(next_work_item)!=RESTORE_PASS_MAIN)
43464345
do_now= false;
43474346

43484347
if (do_now)
@@ -4424,7 +4423,7 @@ restore_toc_entries_parallel(ArchiveHandle *AH, ParallelState *pstate,
44244423
* process in the current restore pass.
44254424
*/
44264425
AH->restorePass=RESTORE_PASS_MAIN;
4427-
move_to_ready_heap(AH,pending_list,ready_heap,AH->restorePass);
4426+
move_to_ready_heap(pending_list,ready_heap,AH->restorePass);
44284427

44294428
/*
44304429
* main parent loop
@@ -4473,7 +4472,7 @@ restore_toc_entries_parallel(ArchiveHandle *AH, ParallelState *pstate,
44734472
/* Advance to next restore pass */
44744473
AH->restorePass++;
44754474
/* That probably allows some stuff to be made ready */
4476-
move_to_ready_heap(AH,pending_list,ready_heap,AH->restorePass);
4475+
move_to_ready_heap(pending_list,ready_heap,AH->restorePass);
44774476
/* Loop around to see if anything's now ready */
44784477
continue;
44794478
}
@@ -4644,8 +4643,7 @@ TocEntrySizeCompareBinaryheap(void *p1, void *p2, void *arg)
46444643
* which applies the same logic one-at-a-time.)
46454644
*/
46464645
staticvoid
4647-
move_to_ready_heap(ArchiveHandle*AH,
4648-
TocEntry*pending_list,
4646+
move_to_ready_heap(TocEntry*pending_list,
46494647
binaryheap*ready_heap,
46504648
RestorePasspass)
46514649
{
@@ -4658,7 +4656,7 @@ move_to_ready_heap(ArchiveHandle *AH,
46584656
next_te=te->pending_next;
46594657

46604658
if (te->depCount==0&&
4661-
_tocEntryRestorePass(AH,te)==pass)
4659+
_tocEntryRestorePass(te)==pass)
46624660
{
46634661
/* Remove it from pending_list ... */
46644662
pending_list_remove(te);
@@ -5052,7 +5050,7 @@ reduce_dependencies(ArchiveHandle *AH, TocEntry *te,
50525050
* memberships changed.
50535051
*/
50545052
if (otherte->depCount==0&&
5055-
_tocEntryRestorePass(AH,otherte)==AH->restorePass&&
5053+
_tocEntryRestorePass(otherte)==AH->restorePass&&
50565054
otherte->pending_prev!=NULL&&
50575055
ready_heap!=NULL)
50585056
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp