pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18115: pg_restore of extensions does not respect dependencies
3+ messages / 3 participants
[nested] [flat]
* BUG #18115: pg_restore of extensions does not respect dependencies
@ 2023-09-18 10:14 PG Bug reporting form <noreply@postgresql.org>
2023-09-18 13:58 ` Re: BUG #18115: pg_restore of extensions does not respect dependencies Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2023-09-18 10:14 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: vasilgiann@gmail.com
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18115: pg_restore of extensions does not respect dependencies
2023-09-18 10:14 BUG #18115: pg_restore of extensions does not respect dependencies PG Bug reporting form <noreply@postgresql.org>
@ 2023-09-18 13:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-09-19 00:16 ` Re: BUG #18115: pg_restore of extensions does not respect dependencies Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2023-09-18 13:58 UTC (permalink / raw)
To: vasilgiann@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> 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.
I don't know anything about aws_s3, but the only inter-extension
dependencies that are tracked by PG are those that are declared
in the extension control files (via "requires" entries).
Sounds to me like aws_s3 has failed to declare its dependency
on plpgsql.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18115: pg_restore of extensions does not respect dependencies
2023-09-18 10:14 BUG #18115: pg_restore of extensions does not respect dependencies PG Bug reporting form <noreply@postgresql.org>
2023-09-18 13:58 ` Re: BUG #18115: pg_restore of extensions does not respect dependencies Tom Lane <tgl@sss.pgh.pa.us>
@ 2023-09-19 00:16 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Paquier @ 2023-09-19 00:16 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: vasilgiann@gmail.com; pgsql-bugs@lists.postgresql.org
On Mon, Sep 18, 2023 at 09:58:56AM -0400, Tom Lane wrote:
> I don't know anything about aws_s3, but the only inter-extension
> dependencies that are tracked by PG are those that are declared
> in the extension control files (via "requires" entries).
> Sounds to me like aws_s3 has failed to declare its dependency
> on plpgsql.
This is something specific to RDS per the AWS docs:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PostgreSQL.S3Import.html
So, yes, that's something to take to them to make sure that the
dependency ordering is correctly tracked, I guess.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-09-19 00:16 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-09-18 10:14 BUG #18115: pg_restore of extensions does not respect dependencies PG Bug reporting form <noreply@postgresql.org>
2023-09-18 13:58 ` Tom Lane <tgl@sss.pgh.pa.us>
2023-09-19 00:16 ` Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox