summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistutil.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2021-03-22 20:22:48 -0400
committerBruce Momjian <bruce@momjian.us>2021-03-22 20:23:52 -0400
commit95d77149c53545a74e0c84717cf8f925b8f6d632 (patch)
treec7a2e9f91ac8b42b5c10684edcb597ede25d075d /src/backend/access/gist/gistutil.c
parent8e4b332e88b8339408a3aa8c62bc93d96b67c808 (diff)
downloadpostgresql-95d77149c53545a74e0c84717cf8f925b8f6d632.tar.gz
Add macro RelationIsPermanent() to report relation permanence
Previously, to check relation permanence, the Relation's Form_pg_class structure member relpersistence was compared to the value RELPERSISTENCE_PERMANENT ("p"). This commit adds the macro RelationIsPermanent() and is used in appropirate places to simplify the code. This matches other RelationIs* macros. This macro will be used in more places in future cluster file encryption patches. Discussion: https://postgr.es/m/20210318153134.GH20766@tamriel.snowman.net
Diffstat (limited to 'src/backend/access/gist/gistutil.c')
-rw-r--r--src/backend/access/gist/gistutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index a3ec9f2cfe..1ff1bf816f 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -1036,7 +1036,7 @@ gistGetFakeLSN(Relation rel)
return counter++;
}
- else if (rel->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT)
+ else if (RelationIsPermanent(rel))
{
/*
* WAL-logging on this relation will start after commit, so its LSNs