| From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
|---|---|
| To: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
| Cc: | Kirill Reshke <reshkekirill(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Subject: | Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) |
| Date: | 2025-11-20 22:23:05 |
| Message-ID: | CAAKRu_Z4tp9JF-ykzxJsmMbW0Wpd1tQgnZaLnae+tD-Qk75qFw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Nov 20, 2025 at 12:55 PM Dagfinn Ilmari Mannsåker
<ilmari(at)ilmari(dot)org> wrote:
>
> I didn't pay much attention to this thread, so I didn't notice this
> until it got committed, but I'd like to lodge an objection to this
> formatting, especially the lack of spaces before the field names. This
> would be much more readable with one struct field per line, i.e.
>
> PruneFreezeParams params = {
> .relation = rel,
> .buffer = buf,
> .reason = PRUNE_VACUUM_SCAN,
> .options = HEAP_PAGE_PRUNE_FREEZE,
> .vistest = vacrel->vistest,
> .cutoffs = &vacrel->cutoffs,
> };
>
> or at a pinch, if we're really being stingy with the vertical space:
>
> PruneFreezeParams params = {
> .relation = rel, .buffer = buf,
> .reason = PRUNE_VACUUM_SCAN, .options = HEAP_PAGE_PRUNE_FREEZE,
> .vistest = vacrel->vistest, .cutoffs = &vacrel->cutoffs,
> };
>
> I had a quick grep, and every other designated struct initialiser I
> could find uses the one-field-per-line form, but they're not consistent
> about the comma after the last field. I personally prefer having it, so
> that one can add more fields later without having to modify the
> unrelated line.
pgindent doesn't allow for a space after the comma before the period.
One reason I used struct initialization was to save space, so I'm a
bit loath to put every member on its own line. However, I don't want
to make the code less readable to others. So, I will commit an update
as you request.
- Melanie
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2025-11-20 22:36:13 | Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB barriers |
| Previous Message | Melanie Plageman | 2025-11-20 22:17:16 | Re: Eagerly evict bulkwrite strategy ring |