Use return value of XLogRecGetBlockTag instead of explicit block ref checks and also use XLogRecHasBlockRef/Image macros instead of explicit checks

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Use return value of XLogRecGetBlockTag instead of explicit block ref checks and also use XLogRecHasBlockRef/Image macros instead of explicit checks
Дата
Msg-id CALj2ACX7LtMUkFs0xyuyn3UBwhbXrX+is0ni7asxkG4dxB=3XQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

I think we can use the return value of XLogRecGetBlockTag instead of
an explicit check XLogRecHasBlockRef as the XLogRecGetBlockTag would
anyways return false in such a case. Also, in some places the macros
XLogRecHasBlockRef and XLogRecHasBlockImage aren't being used instead
the checks are being performed directly.

Although the above change doesn't add any value or improve any
performance but makes use of the existing code better and removes some
unnecessary/duplicate code. Attaching a small patch.

Thoughts?

Regards,
Bharath Rupireddy.

Вложения

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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Move replication slot structures/enums/macros to a new header file for better usability by external tools/modules
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Move replication slot structures/enums/macros to a new header file for better usability by external tools/modules