BUG #18115: pg_restore of extensions does not respect dependencies
От | PG Bug reporting form |
---|---|
Тема | BUG #18115: pg_restore of extensions does not respect dependencies |
Дата | |
Msg-id | 18115-e1bb51d5c161484e@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #18115: pg_restore of extensions does not respect dependencies
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 18115 Logged by: Vasileios Giannakidis Email address: vasilgiann@gmail.com PostgreSQL version: 14.7 Operating system: Red Hat 7.3.1-6 64-bit Description: I have an issue that takes place during restore of a 14.4 database. During this process creation of extension aws_s3 fails because it depends on plpgsql extension which it seems to be created later on. These are the commands we use for dump / restore: pg_dump -d \$DATABASE_URL -j 8 -Z 0 -Fd -f ${backupDir} pg_restore --verbose --clean --no-owner -d \$DATABASE_URL -j 8 --format=d ${backupDir} This is the output of the pg_restore: [2023-09-15T14:31:48.653Z] pg_restore: processing item 2 EXTENSION aws_s3 [2023-09-15T14:31:48.653Z] pg_restore: creating EXTENSION "aws_s3" [2023-09-15T14:31:48.653Z] pg_restore: from TOC entry 2; 3079 57504364 EXTENSION aws_s3 (no owner) [2023-09-15T14:31:48.653Z] pg_restore: error: could not execute query: ERROR: language "plpgsql" does not exist [2023-09-15T14:31:48.653Z] HINT: Use CREATE EXTENSION to load the language into the database. [2023-09-15T14:31:48.653Z] Command was: CREATE EXTENSION IF NOT EXISTS aws_s3 WITH SCHEMA extensions; [2023-09-15T14:31:48.653Z] [2023-09-15T14:31:48.653Z] [2023-09-15T14:31:48.653Z] pg_restore: processing item 8536 COMMENT EXTENSION aws_s3 [2023-09-15T14:31:48.653Z] pg_restore: creating COMMENT "EXTENSION aws_s3" [2023-09-15T14:31:48.653Z] pg_restore: from TOC entry 8536; 0 0 COMMENT EXTENSION aws_s3 [2023-09-15T14:31:48.653Z] pg_restore: error: could not execute query: ERROR: extension "aws_s3" does not exist [2023-09-15T14:31:48.653Z] Command was: COMMENT ON EXTENSION aws_s3 IS 'AWS S3 extension for importing data from S3'; [2023-09-15T14:31:48.653Z] [2023-09-15T14:31:48.653Z] [2023-09-15T14:31:48.653Z] pg_restore: processing item 194 SCHEMA extensions [2023-09-15T14:31:48.653Z] pg_restore: creating SCHEMA "extensions" [2023-09-15T14:31:48.653Z] pg_restore: processing item 1 EXTENSION plpgsql [2023-09-15T14:31:48.653Z] pg_restore: creating EXTENSION "plpgsql" [2023-09-15T14:31:48.653Z] pg_restore: processing item 8539 COMMENT EXTENSION plpgsql [2023-09-15T14:31:48.653Z] pg_restore: creating COMMENT "EXTENSION plpgsql" It seems that dependencies between extensions are not considered by pg_dump.
В списке pgsql-bugs по дате отправления: