RDS Postgres major upgrade from 12 to 13 fails

0

Tried upgrading RDS Postgres from major version 12 to 13. Also tried upgrading related snapshot. These get stuck with an error:

(please note that some info has been obfuscated in the error message to not reveal sensitive information)

Snapshot test is in a state that cannot be upgraded: patchDb 155947 (engine upgrade): pg_restore: from TOC entry 4889; 1259 763225 INDEX tablename_columnname_idx database pg_restore: error: could not execute query: ERROR: permission denied for schema public... Command was: -- For binary upgrade, must preserve pg_class oids SELECT pg_catalog.binary_upgrade_set_next_index_pg_class_oid('763225'::pg_catalog.oid); CREATE INDEX "tablename_columnname_idx" ON "public..."."tablename" USING "gin" ("columnname" "public..."."gin_trgm_ops");

What might cause this? Master user seems to be owner of public schema, also it has CREATE and USAGE privileges to the schema. Master user also is member of rds_superuser. Not sure this matters though, as it seems from the log that pg_restore is run as a user rdsadmin.

From log, it also visible that pg_restore creates succesfully some indexes before the failing one? Is the pg_trgm extension the actual culprit here? weird stuff.

Ok, so removing all pg_trgm indexes kind of solved the problem!?! But would be nice to able to restore those indexes too as they are quite large and re-building those from scratch will take forever.

2개 답변
0

This bug has been fixed in Postgres 14.5

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인