1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Address stats export review comments.

Per discussion, did not use Jian He's patch exactly.

Reported-by: jian he <jian.universality@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/CACJufxFVq=tq9u1zrHWYSbMi1T07gS9Ff0LJScMco4HZmtZ1xw@mail.gmail.com
Discussion: https://postgr.es/m/CADkLM=f1n2_Vomq0gKab7xdxDHmJGgn=DE48P8fzQOp3Mrs1Qg@mail.gmail.com
This commit is contained in:
Jeff Davis
2025-03-06 00:11:12 -08:00
parent 298944e8d8
commit f9f4b43b8d

View File

@ -2936,7 +2936,7 @@ _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH)
{ {
if (!ropt->dumpStatistics) if (!ropt->dumpStatistics)
return 0; return 0;
else
res = REQ_STATS; res = REQ_STATS;
} }
@ -2984,10 +2984,6 @@ _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH)
if (ropt->no_subscriptions && strcmp(te->desc, "SUBSCRIPTION") == 0) if (ropt->no_subscriptions && strcmp(te->desc, "SUBSCRIPTION") == 0)
return 0; return 0;
/* If it's statistics and we don't want statistics, maybe ignore it */
if (!ropt->dumpStatistics && strcmp(te->desc, "STATISTICS DATA") == 0)
return 0;
/* Ignore it if section is not to be dumped/restored */ /* Ignore it if section is not to be dumped/restored */
switch (curSection) switch (curSection)
{ {