Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Mahendra Singh Thalor <mahi6run@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-07T06:13:54Z
Lists: pgsql-hackers
On Wed, Apr 07, 2021 at 06:31:19AM +0530, Bharath Rupireddy wrote: > Setting p->pd_flags = 0; is unnecessary and redundant after memsetting > the page to zeros. Also, see the existing code for pd_prune_xid, > similarly I've done that for pd_flags. I think it's okay with /* > p->pd_flags = 0; done by above MemSet */. Sure, but this one does not hurt much either as-is, so I have left it out, and applied the rest. -- Michael
Commits
-
Remove redundant memset(0) calls for page init of some index AMs
- 4c0239cb7a77 14.0 landed