Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-08 Thread Bharath Rupireddy
On Thu, Apr 8, 2021 at 1:22 PM Michael Paquier wrote: > > On Thu, Apr 08, 2021 at 07:45:25AM +0530, Bharath Rupireddy wrote: > > On Wed, Apr 7, 2021 at 11:47 AM Bharath Rupireddy > > wrote: > >> I wanted to comment out p->pd_flags = 0; in PageInit similar to the > >> pd_prune_xid just for

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-08 Thread Michael Paquier
On Thu, Apr 08, 2021 at 07:45:25AM +0530, Bharath Rupireddy wrote: > On Wed, Apr 7, 2021 at 11:47 AM Bharath Rupireddy > wrote: >> I wanted to comment out p->pd_flags = 0; in PageInit similar to the >> pd_prune_xid just for consistency. >> /* p->pd_prune_xid = InvalidTransactionId;

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-07 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 11:47 AM Bharath Rupireddy wrote: > > On Wed, Apr 7, 2021 at 11:44 AM Michael Paquier wrote: > > > > 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.

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-07 Thread Pavel Borisov
ср, 7 апр. 2021 г. в 10:18, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com>: > On Wed, Apr 7, 2021 at 11:44 AM Michael Paquier > wrote: > > > > On Wed, Apr 07, 2021 at 06:31:19AM +0530, Bharath Rupireddy wrote: > > > Setting p->pd_flags = 0; is unnecessary and redundant after

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-07 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 11:44 AM Michael Paquier wrote: > > 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

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-07 Thread Michael Paquier
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;

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-06 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 12:07 AM Mahendra Singh Thalor wrote: > +++ b/src/backend/storage/page/bufpage.c > @@ -51,7 +51,7 @@ PageInit(Page page, Size pageSize, Size specialSize) > /* Make sure all fields of page are zero, as well as unused space */ > MemSet(p, 0, pageSize); > > -

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-06 Thread Mahendra Singh Thalor
On Tue, 6 Apr 2021 at 19:14, Bharath Rupireddy wrote: > > On Tue, Apr 6, 2021 at 6:09 PM Michael Paquier wrote: > > > > On Mon, Mar 22, 2021 at 10:58:17AM +0530, Mahendra Singh Thalor wrote: > > > Your changes look to fine me and I am also not getting any failure. I > > > think we should

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-06 Thread Bharath Rupireddy
On Tue, Apr 6, 2021 at 6:09 PM Michael Paquier wrote: > > On Mon, Mar 22, 2021 at 10:58:17AM +0530, Mahendra Singh Thalor wrote: > > Your changes look to fine me and I am also not getting any failure. I > > think we should back-patch all the branches. > > > > Patch is applying to all the

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-06 Thread Michael Paquier
On Mon, Mar 22, 2021 at 10:58:17AM +0530, Mahendra Singh Thalor wrote: > Your changes look to fine me and I am also not getting any failure. I > think we should back-patch all the branches. > > Patch is applying to all the branches(till v95) and there is no failure. Er, no. This is just some

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-04 Thread Bharath Rupireddy
On Sat, Apr 3, 2021 at 3:09 PM vignesh C wrote: > > On Mon, Mar 22, 2021 at 10:16 AM Bharath Rupireddy > wrote: > > > > Hi, > > > > We are memset-ting the special space page that's already set to zeros > > by PageInit in BloomInitPage, GinInitPage and SpGistInitPage. We have > > already removed

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-04-03 Thread vignesh C
On Mon, Mar 22, 2021 at 10:16 AM Bharath Rupireddy wrote: > > Hi, > > We are memset-ting the special space page that's already set to zeros > by PageInit in BloomInitPage, GinInitPage and SpGistInitPage. We have > already removed the memset after PageInit in gistinitpage (see the > comment

Re: Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-03-21 Thread Mahendra Singh Thalor
On Mon, 22 Mar 2021 at 10:16, Bharath Rupireddy wrote: > > Hi, > > We are memset-ting the special space page that's already set to zeros > by PageInit in BloomInitPage, GinInitPage and SpGistInitPage. We have > already removed the memset after PageInit in gistinitpage (see the > comment there).

Can we remove extra memset in BloomInitPage, GinInitPage and SpGistInitPage when we have it in PageInit?

2021-03-21 Thread Bharath Rupireddy
Hi, We are memset-ting the special space page that's already set to zeros by PageInit in BloomInitPage, GinInitPage and SpGistInitPage. We have already removed the memset after PageInit in gistinitpage (see the comment there). Unless I'm missing something, IMO they are redundant. I'm attaching a