Re: [PATCH] Check snapshot argument of index_beginscan and family
Aleksander Alekseev <aleksander@timescale.com>
From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Sven Klemm <sven@timescale.com>, Pavel Borisov <pashkin.elfe@gmail.com>
Date: 2022-11-28T10:29:55Z
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
Commits
-
Check the snapshot argument of index_beginscan and family
- 941aa6a6268a 16.0 landed