i was trying to restore database on amazon rds.. i am getting error message like:
ERROR: must be owner of extension plpgsql CREATE EXTENSION
ERROR: must be owner of extension dblink CREATE EXTENSION
ERROR: must be owner of extension pgcrypto
Any idea how to solve this issue ?.
The message means that the command "COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'" had the error. In most cases, this message can be ignored. During the restore, it tries restoring this comment. However, the restore user was not owner of the extension plpgsql, causing the error.
In PostgreSQL, the dollar-quoted string constants ($$) is used in user-defined functions and stored procedures. In PostgreSQL, you use single quotes for a string constant like this: select 'String constant';
Description. pg_restore is a utility for restoring a PostgreSQL database from an archive created by pg_dump in one of the non-plain-text formats. It will issue the commands necessary to reconstruct the database to the state it was in at the time it was saved.
Syntax: ALTER ROLE role_name [WITH] option; The following functions are available with ALTER ROLE statement: SUPERUSER | NOSUPERUSER – It is used to determine if the role is a superuser. VALID UNTIL 'timestamp' – It is used to specify the expiry date and time of a role's password.
I believe both of those extensions are supported by RDS. See:
$SHOW rds.extensions;
Retrieved from this link
As for enabling the syntax should be along the lines of
#enable_extension "dblink";
As Craig Ringer mentioned rds_super isn't a real superuser. So, you can't create the extensions. However, you should be able to enable them.
As in this example
So, you can ignore the errors, but need to manually enable whatever extensions you need. Also I think pl/pgsql may be already there. Try
$\dx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With