| From: | Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Xuneng Zhou <xunengzhou(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Kirill Reshke <reshkekirill(at)gmail(dot)com> |
| Subject: | Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array |
| Date: | 2026-01-09 02:17:55 |
| Message-ID: | CAA3qoJmiYyHykgVW7LA21-31N_+_NS0iJX93PnCCmjNQ5RKUHg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Tom,
On Fri, Jan 9, 2026 at 12:05 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> What makes you think this code isn't adequately tested already?
> The coverage report at
>
>
> https://coverage.postgresql.org/src/backend/replication/logical/snapbuild.c.gcov.html
>
> shows SnapBuildPurgeOlderTxn as pretty fully exercised.
>
>
I wasn’t aware of this website before, so thank you for sharing it.
Actually, this patch evolved from a tiny, "casual" quick-fix patch in its
very first version. I agree that the current effort invested in it possible
has outweighed the potential benefits it may bring.
On a side note, I’m a beginner with PostgreSQL and trying to take on some
simple tasks while deepening my understanding of the system. I noticed that
many items in the coverage tests you provided have rather low coverage
rates (< 75%). Do you think it would be worthwhile to add more test cases
to improve their test coverage? I’d appreciate any advice the community can
offer on this.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Shinya Kato | 2026-01-09 02:19:14 | Re: Use IsA() macro instead of nodeTag comparison |
| Previous Message | Peter Smith | 2026-01-09 01:54:33 | Re: Fix how some lists are displayed by psql \d+ |