Re: [PATCH] Missing Assert in the code

From: Dmitry Nikitin <pgsql-hackers(at)dima(dot)nikitin(dot)name>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Missing Assert in the code
Date: 2024-11-26 15:10:41
Message-ID: 768988596.20241126181041@dima.nikitin.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Alvaro,

Tuesday, November 26, 2024, 2:40:39 PM, you wrote:

AH> By the way, how did you find out about this problem? Is this
AH> hypothetical or was there an actual crash? AFAICS (some of?) the
AH> callers get to this code immediately after executing GinInitPage, so
AH> it's not clear to me that there's an actual bug here.
Code analyzer. And we (our company) must somehow address this issue (a long story why).
I understand that sometimes some cases are pretty impossible because of the "business-logic" that
makes errors checking redundant. However sometimes that "business-logic" changes later on... So this
is a moment when debug asserts come to play and save a lot of time and sane.
Although I don't mind of elog/whatever. I'm just not that familiar with the "business-logic" to make
an appropriate choice.

--
Best regards,
Dmitry mailto:pgsql-hackers(at)dima(dot)nikitin(dot)name

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-11-26 15:10:51 Misleading "epoll_create1 failed: Too many open files"
Previous Message Kirill Reshke 2024-11-26 14:48:40 Re: What db objects can only be created with superuser?