diff options
Diffstat (limited to 'src/backend/access/gist/gist.c')
-rw-r--r-- | src/backend/access/gist/gist.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 4e732d1d857..61be9dbf230 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -113,6 +113,16 @@ gistbuild(PG_FUNCTION_ARGS) elog(ERROR, "index \"%s\" already contains data", RelationGetRelationName(index)); + /* + * We can't yet handle unlogged GiST indexes, because we depend on LSNs. + * This is duplicative of an error in gistbuildempty, but we want to check + * here so as to throw error before doing all the index-build work. + */ + if (heap->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("unlogged GiST indexes are not supported"))); + /* no locking is needed */ initGISTstate(&buildstate.giststate, index); |