Re: POC: Cleaning up orphaned files using undo logs - Mailing list pgsql-hackers

From Amit Khandekar
Subject Re: POC: Cleaning up orphaned files using undo logs
Date
Msg-id CAJ3gD9dZKzhnv5FmyTxQBMexCmMKzQw1h5vqj1+LQo1LnOj89A@mail.gmail.com
Whole thread Raw
In response to Re: POC: Cleaning up orphaned files using undo logs  (Amit Khandekar <amitdkhan.pg@gmail.com>)
List pgsql-hackers
On Fri, 19 Jul 2019 at 17:24, Amit Khandekar <amitdkhan.pg@gmail.com> wrote:
>
> On Thu, 9 May 2019 at 12:04, Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> > Patches can be applied on top of undo branch [1] commit:
> > (cb777466d008e656f03771cf16ec7ef9d6f2778b)
> >
> > [1] https://github.com/EnterpriseDB/zheap/tree/undo
>
> Below are some review points for 0009-undo-page-consistency-checker.patch :

Another point that I missed :

+    * Process the undo record of the page and mask their cid filed.
+    */
+   while (next_record < page_end)
+   {
+       UndoRecordHeader *header = (UndoRecordHeader *) next_record;
+
+       /* If this undo record has cid present, then mask it */
+       if ((header->urec_info & UREC_INFO_CID) != 0)

Here, even though next record starts in the current page, the
urec_info itself may or may not lie on this page.

I hope this possibility is also considered when populating the
partial-record-specific details in the page header.

-- 
Thanks,
-Amit Khandekar
EnterpriseDB Corporation
The Postgres Database Company



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Add parallelism and glibc dependent only options to reindexdb
Next
From: Alvaro Herrera
Date:
Subject: Re: Add parallelism and glibc dependent only options to reindexdb