Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koquW-00028q-Cr for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Dec 2020 16:41:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1koquV-0001RI-Bg for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Dec 2020 16:41:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koquV-0001RB-6A for pgsql-bugs@lists.postgresql.org; Mon, 14 Dec 2020 16:41:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koquT-0004NT-6b for pgsql-bugs@lists.postgresql.org; Mon, 14 Dec 2020 16:41:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0BEGfFvs912769; Mon, 14 Dec 2020 11:41:15 -0500 From: Tom Lane To: edwin.polkerman@splendiddata.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16772: Options --disable-triggers in combination with --superuser does not have the expected result In-reply-to: <16772-3c85d0bb913fa9e8@postgresql.org> References: <16772-3c85d0bb913fa9e8@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 14 Dec 2020 16:22:58 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <912767.1607964075.1@sss.pgh.pa.us> Date: Mon, 14 Dec 2020 11:41:15 -0500 Message-ID: <912768.1607964075@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > Trying to create a dump with following command line: > pg_dumpall -h -p 5432 -U user1 -f /tmp/dump.out > --disable-triggers -S user2 -v > User1 is a regular user and user2 is a superuser like the documentation > states: "Specify the superuser user name to use when disabling triggers" I think you misunderstood the docs; perhaps there's an opportunity to clarify them. The pg_dumpall run itself has to run as superuser so that it can extract role passwords, therefore user1 has to be superuser. What "-S" is for is to specify a superuser role name that the dump's output script can use *at restore time* to monkey with trigger settings. That switch exists mainly because you might be planning to restore into a different installation with different superusers. Therefore, that name is *not* used during the dump. regards, tom lane