diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-29 17:02:50 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-29 17:02:50 -0500 |
commit | 1fb17b1903414676bd371068739549cd2966fe87 (patch) | |
tree | 1e90d8c9a9b08376142014b0d5d4936f4e4ec4f3 /src/backend/access/gist/gistget.c | |
parent | 113fa3945f8969346d6a87b9a56d54afa3d34687 (diff) | |
download | postgresql-1fb17b1903414676bd371068739549cd2966fe87.tar.gz postgresql-1fb17b1903414676bd371068739549cd2966fe87.zip |
Fix issues in pgarch's new directory-scanning logic.
The arch_filenames[] array elements were one byte too small, so that
a maximum-length filename would get corrupted if another entry
were made after it. (Noted by Thomas Munro, fix by Nathan Bossart.)
Move these arrays into a palloc'd struct, so that we aren't wasting
a few kilobytes of static data in each non-archiver process.
Add a binaryheap_reset() call to make it plain that we start the
directory scan with an empty heap. I don't think there's any live
bug of that sort, but it seems fragile, and this is very cheap
insurance.
Cleanup for commit beb4e9ba1, so no back-patch needed.
Discussion: https://postgr.es/m/CA+hUKGLHAjHuKuwtzsW7uMJF4BVPcQRL-UMZG_HM-g0y7yLkUg@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions