Hi,
You were right, the method you described worked well. Thanks you!
But so far, could not get any noticeable improvement in Number of transactions / latency.
I have tried:
1. At xlog.c, CopyXLogRecordToWAL(int write_len, bool isLogSwitch, XLogRecData *rdata,
XLogRecPtr StartPos, XLogRecPtr EndPos), Commenting the memcpy syscall:
memcpy(currpos, rdata_data, rdata_len);
2. XLogInsert(RmgrId rmid, uint8 info), the primary insert function in xloginsert.c.I tried commenting the following line at this function, so I can return a phony pointer every time the function is called, just as in bootstrap mode.
if (IsBootstrapProcessingMode() && rmid != RM_XLOG_ID)
3. At xlog.c, XLogInsertRecord(XLogRecData *rdata, XLogRecPtr fpw_lsn).
Commenting the WALInsertLock(s), as well as, commenting the spinlocks around - Update shared LogwrtRqst. (Write, if we crossed page boundary.)
4. The last thing I tried regarding XLogInsertRecord function is to comment:
"/*
* All the record data, including the header, is now ready to be
* inserted. Copy the record in the space reserved.
*/
CopyXLogRecordToWAL(rechdr->xl_tot_len, isLogSwitch, rdata,
StartPos, EndPos);"
Regards,
Netanel