RE: Is this a problem in GenericXLogFinish()? - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Is this a problem in GenericXLogFinish()?
Date
Msg-id TYAPR01MB58668D6E367C6C57B515E965F5AAA@TYAPR01MB5866.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: Is this a problem in GenericXLogFinish()?  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: Is this a problem in GenericXLogFinish()?
List pgsql-hackers
Dear hackers,

> Dear Amit, Michael,
> 
> Thanks for making the patch!
> 
> > Why register wbuf at all if there are no tuples to add and it is not
> > the same as bucketbuf? Also, I think this won't be correct if prevbuf
> > and wrtbuf are the same and also we have no tuples to add to wbuf. I
> > have attached a naive and crude way to achieve it. This needs more
> > work both in terms of trying to find a better way to change the code
> > or ensure this won't break any existing case. I have just run the
> > existing tests. Such a fix certainly required more testing.
> 
> I'm verifying the idea (currently it seems OK), but at least there is a coding error -
> wbuf_flags should be uint8 here. PSA the fixed patch.

Here is a new patch which is bit refactored. It did:

* If-conditions in _hash_freeovflpage() were swapped.
* Based on above, an Assert(xlrec.ntups == 0) was added.
* A condition in hash_xlog_squeeze_page() was followed the change as well
* comments were adjusted

Next we should add some test codes. I will continue considering but please post anything
If you have idea.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED


Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add recovery to pg_control and remove backup_label
Next
From: David Rowley
Date:
Subject: Re: Compiling warnings on old GCC