Re: pgsql: Define a separately configurable XLOG_BLCKSZ symbol for the page - Mailing list pgsql-committers

From Qingqing Zhou
Subject Re: pgsql: Define a separately configurable XLOG_BLCKSZ symbol for the page
Date
Msg-id e0tdtm$l07$1@news.hub.org
Whole thread Raw
In response to pgsql: Define a separately configurable XLOG_BLCKSZ symbol for the page  (tgl@postgresql.org (Tom Lane))
Responses Re: pgsql: Define a separately configurable XLOG_BLCKSZ symbol for the page
List pgsql-committers
"Tom Lane" <tgl@postgresql.org> wrote
>        xlog.c (r1.231 -> r1.232)
>
> (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c.diff?r1=1.231&r2=1.232)
>

Sorry for my after-fact idea ... I noticed this line in the patch:

@@ -2708,7 +2708,7 @@ ReadRecord(XLogRecPtr *RecPtr, int emode
                             readId, readSeg, readOff)));
             goto next_record_is_invalid;
         }
-        if (read(readFile, readBuf, BLCKSZ) != BLCKSZ)
+        if (read(readFile, readBuf, XLOG_BLCKSZ) != XLOG_BLCKSZ)
         {
             ereport(emode,
                     (errcode_for_file_access(),

This is a patch for write performance, but here theoretically decreases the
read performance due to the possible setting of XLOG_BLCKSZ (say 512 as
sector size, which is << BLCKSZ). It maybe avoidable by still using BLCKSZ
or even more aggresive block size, but may also need some local tweak here.

Regards,
Qingqing



pgsql-committers by date:

Previous
From: jwp@pgfoundry.org (James William Pye)
Date:
Subject: python - fe: Fix relation reference for notify warning.
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Define a separately configurable XLOG_BLCKSZ symbol for the page