]> granicus.if.org Git - postgresql/commitdiff
Further minor improvement in generic_xlog.c: always say REGBUF_STANDARD.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 10 Apr 2016 04:24:28 +0000 (00:24 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 10 Apr 2016 04:24:28 +0000 (00:24 -0400)
Since we're requiring pages handled by generic_xlog.c to be standard
format, specify REGBUF_STANDARD when doing a full-page image, so that
xloginsert.c can compress out the "hole" between pd_lower and pd_upper.
Given the current API in which this path will be taken only for a newly
initialized page, the hole is likely to be particularly large in such
cases, so that this oversight could easily be performance-significant.
I don't notice any particular change in the runtime of contrib/bloom's
regression test, though.

src/backend/access/transam/generic_xlog.c

index 0ddba0007b867db3c94a20201120b7d141e66ad4..072838a5e7a82eecd1fd6cec0d044b6fa621bbe5 100644 (file)
@@ -349,7 +349,8 @@ GenericXLogFinish(GenericXLogState *state)
                        {
                                /* A full page image does not require anything special */
                                memcpy(page, pageData->image, BLCKSZ);
-                               XLogRegisterBuffer(i, pageData->buffer, REGBUF_FORCE_IMAGE);
+                               XLogRegisterBuffer(i, pageData->buffer,
+                                                                  REGBUF_FORCE_IMAGE | REGBUF_STANDARD);
                        }
                        else
                        {