pg_restore: error: could not execute query: ERROR: must be member of role "postgres"

From: "Cappellano, John (MMA)" <John(dot)Cappellano(at)MarshMMA(dot)com>
To: "pgsql-www(at)lists(dot)postgresql(dot)org" <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: pg_restore: error: could not execute query: ERROR: must be member of role "postgres"
Date: 2024-03-21 15:15:23
Message-ID: MN2PR13MB3581BA4E078FC96750DCC2C49B322@MN2PR13MB3581.namprd13.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

All,
I am a novice at Postgres (no experience). We have a VM Amazon Postgres Instance running v13. I am trying to do a pg_dump from it and restore it to Azure PAAS Postgres v11 environment. I keep getting the following error:

pg_restore: error: could not execute query: ERROR: must be member of role "postgres"

The DB on the VM:
[cid:image002(dot)png(at)01DA7B80(dot)B4818B70]

The DB on Azure PAAS:
[cid:image003(dot)png(at)01DA7B80(dot)B4818B70]

I have tried to do a pg_dump with the -O (no owner) but the restore still fails with the same error.
I have also tried to change the owner of the Azure DB to postgres but I get this error:
[cid:image004(dot)png(at)01DA7B81(dot)0EFF7030]

First question,
Can I restore a higher version of Postgreg to a lower version?

Can someone help get me past this issue?

I appreciate any assistance.

Thanks

John Cappellano
Database Administration
Marsh & McLennan Agency LLC
(610) 506-0287 cell
john(dot)cappellano(at)marshmma(dot)com<mailto:john(dot)cappellano(at)marshmma(dot)com> | www.marshmma.com<http://www.marshmma.com/>
[cid:image001(dot)png(at)01DA7B80(dot)25738910]
A business of Marsh McLennan
Marsh & McLennan Agency LLC

________________________________

This e-mail transmission and any attachments that accompany it may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law and is intended solely for the use of the individual(s) to whom it was intended to be addressed. If you have received this e-mail by mistake, or you are not the intended recipient, any disclosure, dissemination, distribution, copying or other use or retention of this communication or its substance is prohibited. If you have received this communication in error, please immediately reply to the author via e-mail that you received this message by mistake and also permanently delete the original and all copies of this e-mail and any attachments from your computer.

Please note that coverage cannot be bound or altered by sending an email. You must speak with or receive written confirmation from a licensed representative of our firm to put coverage in force or make changes to your existing program. Thank you.

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Adrian Klaver 2024-03-21 15:58:54 Re: pg_restore: error: could not execute query: ERROR: must be member of role "postgres"
Previous Message Joe Conway 2024-03-20 18:06:50 Re: Edit wiki