On Thu, Jan 20, 2022 at 8:30 AM Kyotaro Horiguchi <horikyota....@gmail.com> wrote: > > At Thu, 20 Jan 2022 00:36:32 +0000, "Bossart, Nathan" <bossa...@amazon.com> > wrote in > > On 1/3/22, 5:52 PM, "Kyotaro Horiguchi" <horikyota....@gmail.com> wrote: > > > It seems to me "LSN" or just "location" is more confusing or > > > mysterious than "REDO LSN" for the average user. If we want to avoid > > > being technically too detailed, we would use just "start LSN=%X/%X, > > > end LSN=%X/%X". And it is equivalent to "WAL range=[%X/%X, %X/%X]".. > > > > My first instinct was that this should stay aligned with > > pg_controldata, but that would mean using "location=%X/%X, REDO > > location=%X/%X," which doesn't seem terribly descriptive. IIUC the > > "checkpoint location" is the LSN of the WAL record for the checkpoint, > > and the "checkpoint's REDO location" is the LSN where checkpoint > > creation began (i.e., what you must retain for crash recovery). My > > vote is for "start=%X/%X, end=%X/%X." > > +1. Works for me. %X/%X itself expresses it is an LSN.
Thanks for the review. Here's the v4 patch, please have a look. Let's not attempt to change how pg_controldata (tool and core functions) emit the start and end LSN as checkpoint_lsn/redo_lsn and checkpoint location/checkpoint's REDO location. [1] 2022-01-28 03:06:10.213 UTC [2409486] LOG: checkpoint starting: immediate force wait 2022-01-28 03:06:10.257 UTC [2409486] LOG: checkpoint complete: start=0/14D9510, end=0/14D9548; wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.007 s, sync=0.008 s, total=0.044 s; sync files=3, longest=0.005 s, average=0.003 s; distance=0 kB, estimate=0 kB 2022-01-28 03:06:42.254 UTC [2409486] LOG: checkpoint starting: immediate force wait 2022-01-28 03:06:42.279 UTC [2409486] LOG: checkpoint complete: start=0/14DBDB8, end=0/14DBDF0; wrote 2 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.004 s, sync=0.004 s, total=0.025 s; sync files=2, longest=0.003 s, average=0.002 s; distance=10 kB, estimate=10 kB Regards, Bharath Rupireddy.
v4-0001-Add-checkpoint-and-redo-LSN-to-LogCheckpointEnd-l.patch
Description: Binary data