postgresql/contrib/bloom
Tom Lane f10f0ae420 Replace RelationOpenSmgr() with RelationGetSmgr().
The idea behind this patch is to design out bugs like the one fixed
by commit 9d523119f.  Previously, once one did RelationOpenSmgr(rel),
it was considered okay to access rel->rd_smgr directly for some
not-very-clear interval.  But since that pointer will be cleared by
relcache flushes, we had bugs arising from overreliance on a previous
RelationOpenSmgr call still being effective.

Now, very little code except that in rel.h and relcache.c should ever
touch the rd_smgr field directly.  The normal coding rule is to use
RelationGetSmgr(rel) and not expect the result to be valid for longer
than one smgr function call.  There are a couple of places where using
the function every single time seemed like overkill, but they are now
annotated with large warning comments.

Amul Sul, after an idea of mine.

Discussion: https://postgr.es/m/CANiYTQsU7yMFpQYnv=BrcRVqK_3U3mtAzAsJCaqtzsDHfsUbdQ@mail.gmail.com
2021-07-12 17:01:36 -04:00
..
expected Fix failure with lock mode used for custom relation options 2019-09-25 10:07:23 +09:00
sql Fix failure with lock mode used for custom relation options 2019-09-25 10:07:23 +09:00
t Add a copyright notice to perl files lacking one. 2021-05-07 10:56:14 -04:00
.gitignore Bloom index contrib module 2016-04-01 16:42:24 +03:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
blcost.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
blinsert.c Replace RelationOpenSmgr() with RelationGetSmgr(). 2021-07-12 17:01:36 -04:00
bloom--1.0.sql Minor fixes in contrib installation scripts. 2016-06-14 10:47:06 -04:00
bloom.control Bloom index contrib module 2016-04-01 16:42:24 +03:00
bloom.h Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
blscan.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
blutils.c Remove redundant memset(0) calls for page init of some index AMs 2021-04-07 14:35:26 +09:00
blvacuum.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
blvalidate.c Update copyright for 2021 2021-01-02 13:06:25 -05:00