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 17:34:31 |
Message-ID: | CA+TgmobLypZx=cOH+yY1GZmCruaoucHm77A6y_-Bo=h-_3H28g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Mar 23, 2023 at 1:26 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> E.g. continuing after:
>
> rditem = PageGetItemId(ctx.page, rdoffnum);
> if (!ItemIdIsUsed(rditem))
> report_corruption(&ctx,
> psprintf("line pointer redirection to unused item at offset %u",
> (unsigned) rdoffnum));
>
> means we'll look into the tuple in the "update chain validation" loop for
> unused items.
Ah, yes, that's a goof for sure.
> > - * Redirects are created by updates, so successor should be
> > - * the result of an update.
> > + * Redirects are created by HOT updates, so successor should
> > + * be the result of an HOT update.
> > + *
> > + * XXX: HeapTupleHeaderIsHeapOnly() should always imply
> > + * HEAP_UPDATED. This should be checked even when the tuple
> > + * isn't a target of a redirect.
> >
> > Hmm, OK. So the question is where to put this check. Maybe inside
> > check_tuple_header(), making it independent of the update chain
> > validation stuff?
>
> Yes, check_tuple_header sounds sensible to me.
OK, let me spend some more time on this and I'll post a patch (or
patches) in a bit.
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-03-23 17:36:31 | Re: HOT chain validation in verify_heapam() |
Previous Message | Bharath Rupireddy | 2023-03-23 17:33:38 | Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?) |