Re: [PATCH v1] remove redundant check of item pointer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH v1] remove redundant check of item pointer
Дата
Msg-id 3170808.1657839551@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH v1] remove redundant check of item pointer  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: [PATCH v1] remove redundant check of item pointer  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
Peter Geoghegan <pg@bowt.ie> writes:
> The proposal doesn't seem like an improvement. Technically the
> assertion cannot possibly fail here because the earlier assertion
> would always fail instead, so strictly speaking it is redundant -- at
> least right now. That is true. But it seems much more important to be
> consistent about which variant to use. Especially because there is
> obviously no overhead in builds without assertions enabled.

Even in an assert-enabled build, wouldn't you expect the compiler to
optimize away the second assertion as unreachable code?

            regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: doc: New cumulative stats subsystem obsoletes comment in maintenance.sgml
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [PATCH v1] remove redundant check of item pointer