Apr 2024

1 commit
Don't allocate large buffer on the stack in pg_verifybackup
12 Apr 2024Andrew Dunstanmaster17beta1REL_19_STABLE17beta1REL_18_STABLE17beta1REL_17_STABLE17beta1
LLM analysis, 100% surewritten from the discussion, no matching patch1 of 1 reviewer saw the final version

Andres Freund proposed allocating the checksum buffer once in verify_backup_checksums() and reusing it across files #3, and Andrew Dunstan agreed #8. The commit implements that approach in src/bin/pg_verifybackup/pg_verifybackup.c using pg_malloc(), passing the buffer to verify_file_checksum(), and freeing it afterward, plus an indentation cleanup.

  • Andres Freundsaw the final versionLLM analysis, 100% sureHe identified the stack-allocation concern and proposed the caller-allocated reusable buffer adopted by the commit #3.

Credits across 1 commit

Committer
Andrew Dunstan1