From: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Use read streams in pg_visibility |
Date: | 2024-09-09 15:25:07 |
Message-ID: | CAN55FZ0JRSQiXVBPnOTBMY2RrKF8rMA1MS0jnUrCbP8potru-A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Thu, 5 Sept 2024 at 18:54, Noah Misch <noah(at)leadboat(dot)com> wrote:
>
> On Thu, Sep 05, 2024 at 03:59:53PM +0300, Nazir Bilal Yavuz wrote:
> > On Wed, 4 Sept 2024 at 21:43, Noah Misch <noah(at)leadboat(dot)com> wrote:
> > > https://postgr.es/m/CAEudQAozv3wTY5TV2t29JcwPydbmKbiWQkZD42S2OgzdixPMDQ@mail.gmail.com
> > > then observed that collect_corrupt_items() was now guaranteed to never detect
> > > corruption. I have pushed revert ddfc556 of the pg_visibility.c changes. For
> > > the next try, could you add that testing we discussed?
> >
> > Do you think that corrupting the visibility map and then seeing if
> > pg_check_visible() and pg_check_frozen() report something is enough?
>
> I think so. Please check that it would have caught both the blkno bug and the
> above bug.
The test and updated patch files are attached. In that test I
overwrite the visibility map file with its older state. Something like
this:
1- Create the table, then run VACUUM FREEZE on the table.
2- Shutdown the server, create a copy of the vm file, restart the server.
3- Run the DELETE command on some $random_tuples.
4- Shutdown the server, overwrite the vm file with the #2 vm file,
restart the server.
5- pg_check_visible and pg_check_frozen must report $random_tuples as corrupted.
Do you think this test makes sense and enough?
--
Regards,
Nazir Bilal Yavuz
Microsoft
Attachment | Content-Type | Size |
---|---|---|
v6-0001-Add-tests-that-pg_check_-visible-frozen-report-co.patch | text/x-patch | 3.8 KB |
v6-0002-Optimize-pg_visibility-with-read-streams.patch | text/x-patch | 6.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2024-09-09 15:28:44 | Re: On disable_cost |
Previous Message | Robert Haas | 2024-09-09 15:24:28 | Re: query ID goes missing with extended query protocol |