#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2015
    Posts
    2
    Rep Power
    0

    Lightbulb Need an answer to db_restore issue


    Hi All!

    I need an answer to a db_reqstore issue.

    I am currently setting up and RDS on AWS. I have a PostgreSQL database on my VM that I wish to restore to the RDS instance.

    The dump command is:

    pg_dump -Fc $DB > $DB.dump

    The restore command is:

    pg_restore -h $HOST --clean -C -d postgres $DBF

    Which seems to work fine except I get the following error:

    pg_restore: [archiver (db)] Error from TOC entry 2179; 0 0 COMMENT EXTENSION plpgsql
    pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of extension plpgsql
    Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';

    Note that on AWS there is no role for postgres. I created one, but it's not superuser.

    there is a database called postgres, but it's owner role is 'mydb'

    Is there a way to change this if you are not superuser? The superuser is the role 'rdsadmin' as, I suppose, is the AWS way. I don't know the password to the rdsadmin role.

    I think that 'mydb' was set as the role because of what I typed, not knowing any better, in the "Launch" settings for the RDS instance.

    I can blow away this instance and try again, but thought I would ask if this error message on a dbrestore is important or could pose a problem. Or if there was any way to change behaviour during the restore.

    Thanks.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2015
    Posts
    2
    Rep Power
    0
    Originally Posted by james.barwick
    Hi All!

    I need an answer to a db_reqstore issue.
    Update: I blew away the instance and tried again. Same result.

    postgres db owned by role postgres
    postgres role member of rds_superuser role

    all other db users in dump files are member of the postgres role and the postgres role is used to login with db_restore.

    I'm willing to ignore this error as it seems innocuous, but any thoughts?

IMN logo majestic logo threadwatch logo seochat tools logo