Re: HOT chain validation in verify_heapam()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Himanshu Upadhyaya <upadhyaya(dot)himanshu(at)gmail(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Subject: Re: HOT chain validation in verify_heapam()
Date: 2023-03-23 23:20:29
Message-ID: CA+TgmobO27WryCSVkOMvHsk46B2zXY9swiXmwPywRaothBY1aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 23, 2023 at 4:36 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> Could it be that the tests didn't exercise the path before?

Hmm, perhaps.

> > Nonetheless, here's a patch. I notice that there's a similar problem
> > in another place, too. get_xid_status() is called a total of five
> > times and it looks like only three of them got it right. I suppose
> > that if this is correct we should back-patch it.
>
> Yea, I think you're right.

OK.

> > + report_corruption(ctx,
> > + pstrdup("xmin is invalid"));
>
> Not a correctnes issue: Nearly all callers to report_corruption() do a
> psprintf(), the remaining a pstrdup(), as here. Seems like it'd be cleaner to
> just make report_corruption() accept a format string?

Meh.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2023-03-23 23:22:08 Re: PGDOCS - function pg_get_publication_tables is not documented?
Previous Message Karl O. Pinc 2023-03-23 22:55:30 Re: doc: add missing "id" attributes to extension packaging page