Re: Disable WAL completely - Performance and Persistency research

Поиск
Список
Период
Сортировка
От Netanel Katzburg
Тема Re: Disable WAL completely - Performance and Persistency research
Дата
Msg-id CAFN9q6TLey5K1VfGhAz1Cunk88dZc_SbVP7nGtdPoggocNopjg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Disable WAL completely - Performance and Persistency research  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Disable WAL completely - Performance and Persistency research  (Craig Ringer <craig@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Showing parallel status in \df+
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: PSA: Systemd will kill PostgreSQL