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 1koqzI-0002I3-9N for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Dec 2020 16:46:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1koqzH-0003mx-4V for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Dec 2020 16:46:15 +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 1koqzG-0003mq-Pj for pgsql-bugs@lists.postgresql.org; Mon, 14 Dec 2020 16:46:14 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1koqzA-0004SA-KA for pgsql-bugs@lists.postgresql.org; Mon, 14 Dec 2020 16:46:14 +0000 Received: by mail-ed1-x535.google.com with SMTP id b73so17807500edf.13 for ; Mon, 14 Dec 2020 08:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=splendiddata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=CfgwAprKzHnyAD/Cn8j4dA0umjC6fAcrey5/PHb1/cw=; b=gpv8DY3ZaRGqUHEur52pAf9s8RyG0aZNQkM9Y8e7rrnfhZHycGsGrPwJEk1dayCB91 cucAXLYUImoDQI3TaG4IzDHVYEFaLPd5jaCq3OUt2ouad14Ck0LGdX6FrjLiRVdWhYDM ND+OGQdDjl1CoZm8GHs0HWe0RM5BbFM4G9nGeGMR6XAtU8jmY7UCR+UioNozMHlL7ceB ns0cxW12gMXfvh5Rujme0qicx4jox9aO1Z7Uj35+8aoImcJuO4BUhV8O3wVZqAuJJJOw hp+PrTW3rcv6W6N4iNybnf1cFSdpxNDiQjHTvat0DwM4ho8DAymfbB+TA4iNoIeQJUER 3O9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=CfgwAprKzHnyAD/Cn8j4dA0umjC6fAcrey5/PHb1/cw=; b=HhFopAli1lMXtrAtj52Bo31WXZYq+3kpOPZgC3TB2Z0KwTE+2WoqFj1SpUhWtQK0mE Xku27eTcHh8yNOCgBTyCHFZ6j6TEAX2OMPYMLkw4FVYsMevfGTBqxxH2EJ23jappF8fT if7w6ukrQuA9duz597zR5Ze927nmRjC5saEdI0vbp4OdXvRA1Rh3OcVH2eOYwRTyWTSl ygT8U01mhWfUZEEPWIX5+c5A+B0r6Hd3aMwHv92pUPfvcT7xnGXuyc/WVSk13zhUhjxh m3l2Qvx+Dyiy2n6HGJAVe+ArAGVeIoxt92BXoP0tKWcOm2kheLho9XA6ueAE0xd7Ya2b /HvQ== X-Gm-Message-State: AOAM530od9SutAPn48bndvClVjmf1Mnz92t2S2I3zwtkBu8ikH2EH1AL Om7dlbHGwSJqmiAdKkG/No05GAR2JR6bGDNS X-Google-Smtp-Source: ABdhPJwqFOIl5M22fxgJvqq1OgITOhz5ir+whml9N/xbnqok7Nm8d+vwWdGwOXUtyE+8GtG5vwlN2w== X-Received: by 2002:a05:6402:1c96:: with SMTP id cy22mr25142492edb.339.1607964367171; Mon, 14 Dec 2020 08:46:07 -0800 (PST) Received: from ?IPv6:2a02:a448:df6e:1:5d4b:adf8:2d0f:d692? (2a02-a448-df6e-1-5d4b-adf8-2d0f-d692.fixed6.kpn.net. [2a02:a448:df6e:1:5d4b:adf8:2d0f:d692]) by smtp.gmail.com with ESMTPSA id c14sm15842204edy.56.2020.12.14.08.46.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Dec 2020 08:46:06 -0800 (PST) Subject: Re: BUG #16772: Options --disable-triggers in combination with --superuser does not have the expected result To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org References: <16772-3c85d0bb913fa9e8@postgresql.org> <912768.1607964075@sss.pgh.pa.us> From: Edwin Polkerman Organization: Splendid Data Nederland B.V. Message-ID: <823a2a53-41d1-1df2-5e3f-ea4ea6ed628d@splendiddata.com> Date: Mon, 14 Dec 2020 17:46:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <912768.1607964075@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thank you very much for the clarification. I indeed misunderstood the documentation on this one.... On 12/14/20 5:41 PM, Tom Lane wrote: > 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