From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Review for GetWALAvailability() |
Date: | 2020-06-25 03:34:16 |
Message-ID: | 17a69cfe-f1c1-a416-ee25-ae15427c69eb@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020/06/25 3:27, Alvaro Herrera wrote:
> Thanks for those corrections.
>
> I have pushed this. I think all problems Masao-san reported have been
> dealt with, so we're done here.
Sorry for my late to reply here...
Thanks for committing the patch and improving the feature!
/*
* Find the oldest extant segment file. We get 1 until checkpoint removes
* the first WAL segment file since startup, which causes the status being
* wrong under certain abnormal conditions but that doesn't actually harm.
*/
oldestSeg = XLogGetLastRemovedSegno() + 1;
I see the point of the above comment, but this can cause wal_status to be
changed from "lost" to "unreserved" after the server restart. Isn't this
really confusing? At least it seems better to document that behavior.
Or if we *can ensure* that the slot with invalidated_at set always means
"lost" slot, we can judge that wal_status is "lost" without using fragile
XLogGetLastRemovedSegno(). Thought?
Or XLogGetLastRemovedSegno() should be fixed so that it returns valid
value even after the restart?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2020-06-25 03:57:18 | Re: Review for GetWALAvailability() |
Previous Message | Bharath Rupireddy | 2020-06-25 03:00:14 | Re: Parallel copy |