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

Commit16925c1

Browse files
committed
Complain politely about access temp/unlogged tables during recovery.
This has never been supported, but we previously let md.c issue thecomplaint for us at whatever point we tried to examine the backing file.Now we print a nicer error message.Per bug #6041, reported by Emanuel, and extensive discussion with TomLane over where to put the check.
1 parent135a507 commit16925c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/optimizer/util/plancat.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent,
9090
*/
9191
relation=heap_open(relationObjectId,NoLock);
9292

93+
/* Temporary and unlogged relations are inaccessible during recovery. */
94+
if (!RelationNeedsWAL(relation)&&RecoveryInProgress())
95+
ereport(ERROR,
96+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
97+
errmsg("cannot access temporary or unlogged relations during recovery")));
98+
9399
rel->min_attr=FirstLowInvalidHeapAttributeNumber+1;
94100
rel->max_attr=RelationGetNumberOfAttributes(relation);
95101
rel->reltablespace=RelationGetForm(relation)->reltablespace;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp