| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Xuneng Zhou <xunengzhou(at)gmail(dot)com> |
| Cc: | Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, 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-15 10:00:36 |
| Message-ID: | CAD21AoAtY6i_sz=m4wiQkjEd_G9wQWrUit+WqeQFW9tZFx-GTA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Jan 8, 2026 at 7:57 PM Xuneng Zhou <xunengzhou(at)gmail(dot)com> wrote:
>
> Hi,
>
> On Fri, Jan 9, 2026 at 10:18 AM Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com> wrote:
> >
> > 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.
>
> I think improving test coverage is generally beneficial and also helps
> build familiarity with the codebase.
Yes. For instance, the commit 00c3d87a5ca added the test module for
Bitmapset, increasing the test coverage from 85.2% to 93.4%, which is
very nice. While adding more tests is basically beneficial, we need to
keep in mind that test execution time is also important. It would be
great if new tests increase the test coverage and don't take a long
time to complete.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Cramer | 2026-01-15 10:33:11 | Re: Proposal to allow setting cursor options on Portals |
| Previous Message | Chao Li | 2026-01-15 09:53:10 | Re: [PATCH] psql: add \dcs to list all constraints |