From: | Daniel Gustafsson <dgustafsson(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix bug in TOC file error message printing |
Date: | 2021-10-19 11:20:04 |
Message-ID: | E1mcnA4-0000HF-Cu@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix bug in TOC file error message printing
If the blob TOC file cannot be parsed, the error message was failing
to print the filename as the variable holding it was shadowed by the
destination buffer for parsing. When the filename fails to parse,
the error will print an empty string:
./pg_restore -d foo -F d dump
pg_restore: error: invalid line in large object TOC file "": ..
..instead of the intended error message:
./pg_restore -d foo -F d dump
pg_restore: error: invalid line in large object TOC file "dump/blobs.toc": ..
Fix by renaming both variables as the shared name was too generic to
store either and still convey what the variable held.
Backpatch all the way down to 9.6.
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/A2B151F5-B32B-4F2C-BA4A-6870856D9BDE@yesql.se
Backpatch-through: 9.6
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/e788883de715be00733615c2224149332f49b0f0
Modified Files
--------------
src/bin/pg_dump/pg_backup_directory.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2021-10-19 11:20:17 | pgsql: Fix sscanf limits in pg_basebackup and pg_dump |
Previous Message | Daniel Gustafsson | 2021-10-19 11:19:56 | pgsql: Fix bug in TOC file error message printing |