Re: [PATCH] Missing Assert in the code - Mailing list pgsql-hackers

From Dmitry Nikitin
Subject Re: [PATCH] Missing Assert in the code
Date
Msg-id 768988596.20241126181041@dima.nikitin.name
Whole thread Raw
In response to Re: [PATCH] Missing Assert in the code  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List 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@dima.nikitin.name




pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: What db objects can only be created with superuser?
Next
From: Andres Freund
Date:
Subject: Misleading "epoll_create1 failed: Too many open files"