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 1pLR20-0002th-0E for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2023 15:52:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pLR1y-0008B4-S6 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2023 15:52:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLR1y-0008Au-FW for pgsql-hackers@lists.postgresql.org; Fri, 27 Jan 2023 15:52:46 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pLR1s-0007mX-19 for pgsql-hackers@postgresql.org; Fri, 27 Jan 2023 15:52:45 +0000 Received: by mail-pg1-x531.google.com with SMTP id v3so3468220pgh.4 for ; Fri, 27 Jan 2023 07:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qGpBxPitR9NukYvTXVawNN5b2S+xo9lfSVU/acT4Exw=; b=adT8XxlYroElBPowCB7YwcN83QTjcep7DEBM51v9rPr5js6aaWtSbO5saohrWZnKw5 i8i2d70l3klhkqUGdT8C1jQg72+1cUb4duNmY+KkRE+a4T7XvoOxfAhgaLzBpFoGDB/x ckjjL3BpulVwUPEE8uGHrY8e0SPvkMwlr6MujTVLZXK3RPitS+EBq9uj8SeGwzrkmK5L ZLAeVsOnRTZ4Mn7HH260qxHBniR7VcVYX7zgOdSsaLklUOn03Uh7SSmu5qK5GeZGib4U ERSYI44dqsEesktyGPTlWYT9s92XDIO1WEqYbZTIfKjLMeWs/M0XIm2SwsdOJC94hASB SY0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qGpBxPitR9NukYvTXVawNN5b2S+xo9lfSVU/acT4Exw=; b=qG9RAS0jOJxa1T5RdlmB7l/huBYr2TUq4kqTAW/WoBR1decBZ+Sq9Bw6FJ5jM7YGHt vmbt41siMIYfmt+Z2ZWcCtcsp5tLGx60M2JeNzz0oeDsvooPzdsPmI11qi6Y87AVxfhw Jy7LT9uOW4iV1GEpQTgB7c17KalE86ct9xNqGtE0i1n5Kfx1C+RvSHFcf6vaqwONvAc1 hx8UnkgqTuAmqZWaz1o6YA67QiNKH1doLtMBLsT+ScpieEeKV2XpWnEokC9hYupKzZZc QrgJdGYXpZWnmAZ73OVMWbrxbVcvVcXPPzE3pHTLR0ksugEXBRQKgIB3qqh5mV9ELnV8 to0Q== X-Gm-Message-State: AFqh2krkhYgTdcGmAqAXVDx6AV/G/0UdaIpOLJ80mG/Xdiwr0phGP1tC rEJw6ypo2XN5szKXmP4532M= X-Google-Smtp-Source: AMrXdXtQWAGPVnL8GnbW9Ff7dk+vEYCoceMIMnVvM7555rvtL225bwjTTVOZmRzPBir71cd04IB7tQ== X-Received: by 2002:a05:6a00:851:b0:58e:698:fe45 with SMTP id q17-20020a056a00085100b0058e0698fe45mr41269794pfk.14.1674834759028; Fri, 27 Jan 2023 07:52:39 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id z16-20020aa785d0000000b0058bc37f3d13sm2808667pfn.43.2023.01.27.07.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 07:52:38 -0800 (PST) Date: Fri, 27 Jan 2023 07:52:36 -0800 From: Nathan Bossart To: Robert Haas Cc: Peter Eisentraut , "pgsql-hackers@postgresql.org" Subject: Re: improving user.c error messages Message-ID: <20230127155236.GA2043658@nathanxps13> References: <20230118231749.GA3790025@nathanxps13> <20230126002251.GA1506128@nathanxps13> <9811affe-6755-2618-001b-46d6218e5463@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jan 27, 2023 at 08:31:32AM -0500, Robert Haas wrote: > I almost hate to bring this up since I'm not sure how far we want to > go down this rat hole, but what should be our policy about mentioning > superuser? I don't think we're entirely consistent right now, and I'm > not sure whether every error message needs to mention that if you were > the superuser you could do everything. Is that something we should > mention always, never, or in some set of circumstances? IMHO superuser should typically only be mentioned when it is the only way to do something. Since superusers have all privileges, I think logs like "superuser or privileges of X" are kind of redundant. If Robert has privileges of X, we wouldn't say "privileges of X or Robert." We'd just point to X. Ultimately, I feel like mentioning superuser in error messages usually just makes the message longer without adding any useful information. I recognize that this is a bold opinion and that the policy to mention superuser might need to be more nuanced in practice... -- Nathan Bossart Amazon Web Services: https://aws.amazon.com