Correct comment in RemoveNonParentXlogFiles() - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Correct comment in RemoveNonParentXlogFiles()
Date
Msg-id CAE9k0PnOWt7Q_x_1Aq_081+p=ujQGshpJDTMi22vxrZoEJ6wxw@mail.gmail.com
Whole thread Raw
Responses Re: Correct comment in RemoveNonParentXlogFiles()
List pgsql-hackers
HI All,

Following comment in RemoveNonParentXlogFiles() says that we are trying to remove any WAL file whose segment number is >= the segment number of the first WAL file on the new timeline. However, looking at the code, I can say that we are trying to remove the WAL files from the previous timeline whose segment number is just greater than (not equal to) the segment number of the first WAL file in the new timeline. I think we should improve this comment, thoughts?


        /*
         * Remove files that are on a timeline older than the new one we're
         * switching to, but with a segment number >= the first segment on the
         * new timeline.
         */
        if (strncmp(xlde->d_name, switchseg, 8) < 0 &&
            strcmp(xlde->d_name + 8, switchseg + 8) > 0)

--
With Regards,
Ashutosh Sharma.

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Smoothing the subtrans performance catastrophe
Next
From: Amit Kapila
Date:
Subject: Re: logical replication restrictions