From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Robert Treat <rob(at)xzilla(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, jian he <jian(dot)universality(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, alvherre(at)alvh(dot)no-ip(dot)org |
Subject: | Re: Statistics Import and Export |
Date: | 2025-04-04 02:19:51 |
Message-ID: | Z-9Bx3ml2i7OfHiN@nathan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thanks for reviewing.
On Thu, Apr 03, 2025 at 03:23:40PM -0700, Jeff Davis wrote:
> This simplifies commit a0a4601765. I'd break out that simplification as
> a separate commit to make it easier to understand what happened.
Done.
> In patch 0003, there are quite a few static function-scoped variables,
> which is not a style that I'm used to. One idea is to bundle them into
> a struct representing the cache state (including enough information to
> fetch the next batch), and have a single static variable that points to
> that.
As discussed off-list, I didn't take this suggestion for now. Corey did
this originally, and I converted it to static function-scoped variables 1)
to reduce patch size and 2) because I noticed that each of the state
variables were only needed in one function. I agree that a struct might be
slightly more readable, but we can always change this in the future if
desired.
> Also in 0003, the "next_te" variable is a bit confusing, because it's
> actually the last TocEntry, until it's advanced to point to the current
> one.
I've renamed it to expected_te.
> Other than that, looks good to me.
Great. I'm planning to commit the attached patch set tomorrow morning.
For the record, I spent most of today trying very hard to fix the layering
violations in 0002. While I was successful, the result was awkward,
complicated, and nigh unreadable. This is now the second time I've
attempted to fix this and have felt the result was worse than where I
started. So, I added extremely descriptive comments instead. I'm hoping
that it will be possible to clean this up with some additional work in v19.
I have a few ideas, but if anyone has suggestions, I'm all ears.
--
nathan
Attachment | Content-Type | Size |
---|---|---|
v12n6-0001-Skip-second-WriteToc-call-for-custom-format-du.patch | text/plain | 1.6 KB |
v12n6-0002-pg_dump-Reduce-memory-usage-of-dumps-with-stat.patch | text/plain | 11.1 KB |
v12n6-0003-pg_dump-Retrieve-attribute-statistics-in-batch.patch | text/plain | 12.4 KB |
v12n6-0004-Partially-revert-commit-a0a4601765.patch | text/plain | 5.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2025-04-04 02:53:54 | Re: Removing unneeded self joins |
Previous Message | Peter Smith | 2025-04-03 23:01:49 | Re: Question -- why is there no errhint_internal function? |