Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uQ8p7-005Y5x-Dw for pgsql-general@arkaria.postgresql.org; Fri, 13 Jun 2025 18:08:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uQ8p4-004hsH-CR for pgsql-general@arkaria.postgresql.org; Fri, 13 Jun 2025 18:08:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uQ8p4-004hs6-1Z for pgsql-general@lists.postgresql.org; Fri, 13 Jun 2025 18:08:14 +0000 Received: from mail.w13.tutanota.de ([185.205.69.213]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uQ8p2-001sot-1s for pgsql-general@lists.postgresql.org; Fri, 13 Jun 2025 18:08:14 +0000 Received: from tutadb.w10.tutanota.de (w10.api.tuta.com [IPv6:fd:ac::d:10]) by mail.w13.tutanota.de (Postfix) with ESMTP id 93BE295D41BE for ; Fri, 13 Jun 2025 20:08:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1749838091; s=s1; d=tutanota.de; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=cL30il5L5XtIAm2SCtdHQZF1pXl97rtv1X/pUm7epGk=; b=FvYyCzd4MOyOC7EjMfSYvXosDi9nm7m/8wKn+5SIaVl0tkMhN0U4PRUBHnHEfZ4x CRRebCahqt/TiBrQ4/VOpHQd6Ab3wvkrUpjnz366SqP9b2r2lUuTw26Uw3OhsT9NA1D voaCCvr/7ZM409aJWE+UTwvKkT2iTbdSbqIV/+msspga7AcQa0lzoShNA3wD0lM3Qq5 VVi1FPstNiuXu1LT3T2VaRvDKjaeMa4uSc/97E80mDRaFdDV+Y1ipwxbIZzVXb9ENgw v6gs46Zxp37znC6w+MM1L74wMuSP0LUXebQ6e5RRaLW22/i7aqL2S4rYBhAmrbIL1FP A1GMNZsxDA== Date: Fri, 13 Jun 2025 20:08:11 +0200 (CEST) From: Rachel Roch To: Pgsql General Message-ID: Subject: pg_restore ERROR: permission denied to change default privileges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I have a pg_dump from a postgres instance that I am attempting to restore o= nto a cloud one (i.e. an instance where I don't have access to the postgres= superuser) The dump was taken with: pg_dump -Fc --quote-all-identifiers --serializable-deferrable --no-unlogged= -table-data my_database > my_database.dump I am attempting to restore it using the proxy admin user provided by the cl= oud provider: pg_restore -d "host=3Dfoobar.example.com port=3D12345 user=3Dmy_cloud_admin= _user sslrootcert=3D/path/to/the/cert.crt sslmode=3Drequire dbname=3Dmy_dat= abase" -O -1=C2=A0my_database.dump This is the error I am seeing: pg_restore: error: could not execute query: ERROR:=C2=A0 permission denied = to change default privilegesCommand was: ALTER DEFAULT PRIVILEGES FOR ROLE = "postgres" IN SCHEMA "public" GRANT SELECT ON TABLES TO "my_database_ro"; N.B. "my_database_ro" being a user that was on the original database, and w= as successfully created in the new database by restoring a "pg_dumpall --gl= obals-only" into the new database before attempting the pg_restore