Wednesday, August 16, 2017

[google-cloud-sql-discuss] Re: ERROR: must be owner of extension plpgsql

Hello Mike, I've tried to use this comand pg_dump -Fc --no-acl --no-owner -h <connection> -d <database> -U <user> , but I've got error when tried restore database that dump file has custom format and should be use psql. Maybe you have some ideas. P.S. I've tried to migrate postgres db from another server to Google Cloud.

On Thursday, July 27, 2017 at 5:57:01 AM UTC+2, Mike Hardy wrote:
Thanks Carlos, for anyone who comes across this problem, we solved it with this:

pg_dump -Fc --no-acl --no-owner -h <connection> -d <database> -U <user>

On Tuesday, July 25, 2017 at 7:40:59 AM UTC-7, Carlos (Cloud Platform Support) wrote:
Hi Mike,

It does seems that the dump file you are trying to import includes some plpgsql statements requiring Superuser role. This role is certainly not available on hosted PostgreSQL.

It is unlikely that you need to import plpgsql related statements since by default, the database has the plpgsql extension already installed. So there is no need to install it again via the import.

The suggested workaround is to inspect you inspect your dump file and remove all sql statement related to "plpgsql".

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/6087c10d-13e9-4479-84cf-fa2ae9c2b62b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment