From: | Alexander Korotkov <akorotkov(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Check the snapshot argument of index_beginscan and family |
Date: | 2022-12-06 00:29:33 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Check the snapshot argument of index_beginscan and family
Passing a NULL snapshot (InvalidSnapshot) is going to work but only as long
as the index can't find any matching rows. This can be confusing for
the extension authors, so add an explicit check for this argument. The check
is implemented with Assert() in order to avoid overhead in release builds.
Reported-by: Sven Klemm
Discussion: https://postgr.es/m/CAJ7c6TPxitD4vbKyP-mpmC1XwyHdPPqvjLzm%2BVpB88h8LGgneQ%40mail.gmail.com
Author: Aleksander Alekseev
Reviewed-by: Pavel Borisov
Branch
------
master
Modified Files
--------------
src/backend/access/index/indexam.c | 8 ++++++++
1 file changed, 8 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-12-06 01:54:52 | pgsql: Generate pg_stat_get*() functions for tables using macros |
Previous Message | Michael Paquier | 2022-12-06 00:20:46 | pgsql: Provide test coverage in pg_dump for default behaviors with comp |