How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?

Поиск
Список
Период
Сортировка
От Ashutosh Sharma
Тема How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?
Дата
Msg-id CAE9k0PkyJmWhTmBvq-JktkH7pE79rOe=jc8BTJTYEsARQUPbDw@mail.gmail.com
обсуждение исходный текст
Ответы Re: How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
Hi All,

Currently, in postgres we have two different functions that are
specially used to open the WAL files for reading and writing purposes.
The first one is XLogFileOpen() that is just used to open the WAL file
so that we can write WAL data in it. And then we have another function
named XLogFileRead that does the same thing but is used when reading
the WAL files during recovery time. How about renaming the function
XLogFileRead to XLogFileOpenForRead and the other one can be renamed
to XLogFileOpenForWrite. I think it will make the function name more
clear and increase the readability. At least XlogFileRead doesn't look
good to me, from the function name it actually appears like we are
trying to read a WAL file here but actually we are opening it so that
it can be read by some other routine.

Also I see that we are passing emode to the XLogFileRead function
which is not being used anywhere in the function, so can we remove it?

--
With Regards,
Ashutosh Sharma.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Support logical replication of DDLs
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?