Re: [PATCH] Check snapshot argument of index_beginscan and family

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Sven Klemm <sven(at)timescale(dot)com>, Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
Subject: Re: [PATCH] Check snapshot argument of index_beginscan and family
Date: 2022-11-28 10:29:55
Message-ID: CAJ7c6TOf=2h64U=knCS8_VrR8iFkZ=+=xH1F5CEJdXqCsQNtgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Pavel,

Thanks for the feedback!

> I think it's a nice catch and worth fixing. The one thing I don't
> agree with is using asserts for handling the error that can appear
> because most probably the server is built with assertions off and in
> this case, there still will be a crash in this case. I'd do this with
> report ERROR. Otherwise, the patch looks right and worth committing.

Normally a developer is not supposed to pass NULLs there so I figured
having extra if's in the release builds doesn't worth it. Personally I
wouldn't mind using ereport() but my intuition tells me that the
committers are not going to approve this :)

Let's see what the rest of the community thinks.

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-11-28 10:38:18 Re: Introduce a new view for checkpointer related stats
Previous Message Dean Rasheed 2022-11-28 10:29:41 Re: Another multi-row VALUES bug