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

Commit5dce8ce

Browse files
committed
Ensure that "pg_restore -l" reports dependent TOC entries correctly.
If -l was specified together with selective-restore options such as -nor -N, dependent TOC entries such as comments would be omitted fromthe listing, even when an actual restore would have selected them.This happened because PrintTOCSummary neglected to update the te->reqsmarking of the entry they depended on.Per report from Justin Pryzby. This has been wrong since0d4e6edtaught _tocEntryRequired to sometimes look at the "reqs" marking ofother TOC entries, so back-patch to all supported branches.Discussion:https://postgr.es/m/ZjoeirG7yxODdC4P@pryzbyj2023
1 parentbe18a12 commit5dce8ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1230,10 +1230,13 @@ PrintTOCSummary(Archive *AHX)
12301230
curSection=SECTION_PRE_DATA;
12311231
for (te=AH->toc->next;te!=AH->toc;te=te->next)
12321232
{
1233+
/* This bit must match ProcessArchiveRestoreOptions' marking logic */
12331234
if (te->section!=SECTION_NONE)
12341235
curSection=te->section;
1236+
te->reqs=_tocEntryRequired(te,curSection,AH);
1237+
/* Now, should we print it? */
12351238
if (ropt->verbose||
1236-
(_tocEntryRequired(te,curSection,AH)& (REQ_SCHEMA |REQ_DATA))!=0)
1239+
(te->reqs& (REQ_SCHEMA |REQ_DATA))!=0)
12371240
{
12381241
char*sanitized_name;
12391242
char*sanitized_schema;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp