Hi,

Thanks for updating the patch! I checked 0001 again and here is my comment.

```
        if (xldata->is_prim_bucket_same_wrt)
        {
                /*
                 * If the primary bucket page is modified, it is registered as 
block
                 * 0 and read for redo.  Otherwise, acquire its cleanup lock
                 * separately.
                 */
                if (XLogRecHasBlockRef(record, 0))
                        action = XLogReadBufferForRedoExtended(record, 0, 
RBM_NORMAL, true, &writebuf);
                else
                {
                        bucketbuf = hash_xlog_lock_primary_bucket(record, 1, 
SizeOfHashSqueezePage);
                        action = BLK_NOTFOUND;
                }
        }
        else
        {
                bucketbuf = hash_xlog_lock_primary_bucket(record, 1, 
SizeOfHashSqueezePage);

                if (xldata->ntups > 0 || xldata->is_prev_bucket_same_wrt)
                        action = XLogReadBufferForRedo(record, 0, &writebuf);
                else
                        action = BLK_NOTFOUND;
        }
```

While reading the code again, I came up with another idea to clean up the code:
how about making the code similar with the WAL generation side? Something like
attached. Or is it matter of taste?

For now I cannot find other comments.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Attachment: nocfbot-0001-simplify-hash_xlog_squeeze_page.patch
Description: nocfbot-0001-simplify-hash_xlog_squeeze_page.patch

Reply via email to