Re: Disable WAL completely - Performance and Persistency research - Mailing list pgsql-hackers

From Netanel Katzburg
Subject Re: Disable WAL completely - Performance and Persistency research
Date
Msg-id CAFN9q6TLey5K1VfGhAz1Cunk88dZc_SbVP7nGtdPoggocNopjg@mail.gmail.com
Whole thread Raw
In response to Re: Disable WAL completely - Performance and Persistency research  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Disable WAL completely - Performance and Persistency research
List pgsql-hackers
Hi Michael,

Sorry for the delay,
The answer is yes,

I tried 2 things so far:
1. As I understand:
XLogRecPtr
XLogInsert(RmgrId rmid, uint8 info)
is 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)

2. 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);

...


BUT, both options are not good, as they are stopping me from even running initdb. 


Maybe someone have a lead regarding changes to be done at xlog.c: 

XLogInsertRecord(XLogRecData *rdata, XLogRecPtr fpw_lsn)

Any other lead  regarding xloginsert.c is welcomed as well.


Regards,

Netanel


On Thu, Jul 7, 2016 at 4:17 PM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Thu, Jul 7, 2016 at 5:01 PM, Netanel Katzburg <netanel10k@gmail.com> wrote:
> 1. Disable the WAL by not writing anything to the xlog directory. I don't
> care about recovery/fault tolerance or PITR/ replication etc at the moment.
> I'm aware that the WAL and checkpoint are bind in many ways and are crucial
> for PG core features.
> Any guidance on how to do so would be appreciated :)

WAL insertion routines are in xloginsert.c. Did you try to play with those?
--
Michael

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Showing parallel status in \df+
Next
From: "Joshua D. Drake"
Date:
Subject: PSA: Systemd will kill PostgreSQL