RE: Fix of fake unlogged LSN initialization

tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>

From: "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
To: 'Simon Riggs' <simon@2ndquadrant.com>, Michael Paquier <michael@paquier.xyz>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2019-10-25T02:07:04Z
Lists: pgsql-hackers
From: Simon Riggs <simon@2ndquadrant.com>
> 	From xlogdefs.h added by 9155580:
> 	/*
> 	 * First LSN to use for "fake" LSNs.
> 	 *
> 	 * Values smaller than this can be used for special per-AM purposes.
> 	 */
> 	#define FirstNormalUnloggedLSN  ((XLogRecPtr) 1000)

Yeah, I had seen it, but I didn't understand what kind of usage is assumed.


> I wonder why is that value 1000, rather than an aligned value or a whole WAL
> page?

I think that's because this fake LSN is not associated with the physical position of WAL records.


Regards
Takayuki Tsunakawa


Commits

  1. Fix initialization of fake LSN for unlogged relations