Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit331bf67

Browse files
committed
Throw error sooner for unlogged GiST indexes.
Throwing an error only after we've built the main index fork is prettyunfriendly when the table already contains data. Per gripe from JayLevitt.
1 parentd77354e commit331bf67

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎src/backend/access/gist/gistbuild.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ gistbuild(PG_FUNCTION_ARGS)
144144
elog(ERROR,"index \"%s\" already contains data",
145145
RelationGetRelationName(index));
146146

147+
/*
148+
* We can't yet handle unlogged GiST indexes, because we depend on LSNs.
149+
* This is duplicative of an error in gistbuildempty, but we want to check
150+
* here so as to throw error before doing all the index-build work.
151+
*/
152+
if (heap->rd_rel->relpersistence==RELPERSISTENCE_UNLOGGED)
153+
ereport(ERROR,
154+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
155+
errmsg("unlogged GiST indexes are not supported")));
156+
147157
/* no locking is needed */
148158
buildstate.giststate=initGISTstate(index);
149159

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp