| From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: glist: _Generic wrapper for selective dlist/dclist usage |
| Date: | 2026-09-02 22:48:44 |
| Message-ID: | CAApHDvo437+Ln-3C7+EDNW5k3dMpSKb-z6PCr_0quPpf=YqboA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 2 Sept 2026 at 23:36, Matthias van de Meent
<boekewurm+postgres(at)gmail(dot)com> wrote:
> Attached is a patch that adds glist_* macros, which wrap several
> dlist/dclist_* APIs, so that developers can use dlist/dclist
> selectively in different environments, without significant visual
> overhead in the code. I'm planning to use this in the Proxy memory
> contexts over at [1].
This feels like putting the cart before the horse. What purpose does
maintaining a count in the dlist serve at all for [1]? Last I looked
at the 0004 patch on [1] you were only counting and asserting the
count in debug builds. Since the count is not used for anything else,
it seemed to me that all the assert was doing was verifying the count
tracking was correct, and since that count tracking code only existed
in debug builds, there was no point in it.
I think if you have a concrete proposal for your 0001 patch here,
there should be a 0002 patch which uses the new macros for some
legitimate reason. Otherwise, if the only legit reason is in [1], then
this patch should be part of that series. At the moment, all this
thread proposes to do is introduce dead code.
David
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Andres Freund | 2026-09-02 22:14:15 | Re: PGQ catalog representation and pg_dump support |