| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
| Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Junwang Zhao <zhjwpku(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH v1] remove redundant check of item pointer |
| Date: | 2022-07-14 22:59:11 |
| Message-ID: | 3170808.1657839551@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Peter Geoghegan <pg(at)bowt(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2022-07-14 23:10:20 | Re: [PATCH v1] remove redundant check of item pointer |
| Previous Message | Bruce Momjian | 2022-07-14 22:58:09 | Re: doc: New cumulative stats subsystem obsoletes comment in maintenance.sgml |