| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Several refactorings for pg_dump |
| Date: | 2026-08-19 08:31:50 |
| Message-ID: | F46883FA-C94A-4F69-80D4-0665A55EDBB5@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 18 Aug 2026, at 17:10, Aleksander Alekseev <aleksander(at)tigerdata(dot)com> wrote:
> 1. I found a write-only field ArchiveHandle.lookaheadSize which can
> safely be removed.
> 2. I found magic constants 512 which should be replaced with TAR_BLOCK_SIZE.
Might be a nitpick, but I'm not sure that using TAR_BLOCK_SIZE is preferred for
a lookahead buffer used to identify the archive format where tar is just one of
the options.
I would be more inclined to initialize .lookaheadSize like today and then use
that instead of the hardcoded 512. Having a buffer in ArchiveHandle without
knowing the size of it does seem like a bad practice even if nothing uses it
today.
--
Daniel Gustafsson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-08-19 08:32:47 | Re: pg_control_checkpoint(): add "data_checksum_version" (Pg19)? |
| Previous Message | Haibo Yan | 2026-08-19 08:14:47 | Re: Fix for fragile code in hashtext() |