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

Commite951f66

Browse files
committed
Fail BRIN control functions during recovery explicitly
They already fail anyway, but prior to this patch they raise an uglyerror message about a lock that cannot be acquired. This just improvesthe message.Author: Masahiko SawadaReported-by: Masahiko SawadaDiscussion:https://postgr.es/m/CAD21AoBZau4g4_NUf3BKNd=CdYK+xaPdtJCzvOC1TxGdTiJx_Q@mail.gmail.comReviewed-by: Kuntal Ghosh, Alexander Korotkov, Simon Riggs, Michaël Paquier, Álvaro Herrera
1 parentc7699d9 commite951f66

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/access/brin/brin.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,12 @@ brin_summarize_new_values(PG_FUNCTION_ARGS)
788788
RelationheapRel;
789789
doublenumSummarized=0;
790790

791+
if (RecoveryInProgress())
792+
ereport(ERROR,
793+
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
794+
errmsg("recovery is in progress"),
795+
errhint("BRIN control functions cannot be executed during recovery.")));
796+
791797
/*
792798
* We must lock table before index to avoid deadlocks. However, if the
793799
* passed indexoid isn't an index then IndexGetRelation() will fail.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp