Re: TransactionIdGetCommitTsData and its dereferenced pointers
В списке pgsql-hackers по дате отправления:
| От | Alvaro Herrera |
|---|---|
| Тема | Re: TransactionIdGetCommitTsData and its dereferenced pointers |
| Дата | |
| Msg-id | 20150821174221.GZ5232@alvherre.pgsql обсуждение |
| Ответ на | TransactionIdGetCommitTsData and its dereferenced pointers (Michael Paquier <michael.paquier@gmail.com>) |
| Список | pgsql-hackers |
Michael Paquier wrote: > TransactionIdGetCommitTsData@commit_ts.c does the following: > if (ts) > *ts = entry.time; > [...] > return *ts != 0; > This is a bad idea, because if TransactionIdGetCommitTsData is called > with ts == NULL this would simply crash. It seems to me that it makes > little sense to have ts == NULL either way because this function is > intended to return a timestamp in any case, hence I think that we > should simply Assert(ts == NULL) and remove those checks. I pushed this. But without the assert, because it's pointless: if the passed pointer were indeed null, we would still crash later in the function, getting the same effect as the assert. Thanks, -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера