IndexAmRoutine aminsertcleanup function can be NULL?
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-16T00:08:07Z
Lists: pgsql-hackers
Hi hackers. I happened to notice that many contrib module indexes do not implement an aminsertcleanup function: e.g. amroutine->aminsertcleanup = NULL; But, unlike many of the other interface functions, the aminsertcleanup does not say "/* can be NULL */" in the typedef struct IndexAmRoutine [1]. What's going on there? Is it just an accidentally missing "/* can be NULL */" comment? Same also in the documentation... [2] ====== [1] https://github.com/postgres/postgres/blob/master/src/include/access/amapi.h [2] https://www.postgresql.org/docs/devel/index-api.html Kind Regards, Peter Smith. Fujitsu Australia
Commits
-
Add assertions for all the required index AM callbacks
- 6f22a82a401d 19 (unreleased) landed
-
doc: Inform about aminsertcleanup optional NULLness
- d331243dc95d 17.6 landed
- 282b10cb055e 18.0 landed
- 19179dbffc8f 19 (unreleased) landed
-
Reuse BrinDesc and BrinRevmap in brininsert
- c1ec02be1d79 17.0 cited