Re: use correct variable in error message in _allocAH function (pg_backup_archiver.c)

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Mahendra Singh Thalor <mahi6run@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-04-15T08:02:51Z
Lists: pgsql-hackers

On 2025/04/15 7:21, Mahendra Singh Thalor wrote:
> Hi hackers,
> 
> In _allocAH function(pg_backup_archiver.c), we were using the *fmt* variable in switch case for *default case*, but correct variable is AH->format.
> 
> Here, I am attaching a patch for the same.

Thanks for the report and patch! It looks good to me.
Since this issue exists in the back branches,
the patch needs be back-patched to all supported versions.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. pg_dump: Fix incorrect archive format shown in error message.