Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEEjC-0007AB-2x for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Apr 2019 15:01:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEEjA-0003dt-QE for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Apr 2019 15:01:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEEjA-0003bk-Ay for pgsql-bugs@lists.postgresql.org; Wed, 10 Apr 2019 15:01:28 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEEj7-0005R8-Dt for pgsql-bugs@lists.postgresql.org; Wed, 10 Apr 2019 15:01:27 +0000 Received: by mail-qt1-x843.google.com with SMTP id k14so3263788qtb.0 for ; Wed, 10 Apr 2019 08:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=ZfVvFutzzS6qtk6HEbI+EVKHR9qpgGiVCqJ6EVhU90M=; b=u9mlUregErDVvcCkfcSjsqg8X1cdziMEueD+qEvJqajbOUvFejer7Dhex9ErbtV0MW dkErichMKvBWNT3tZarhRFILnhnPmsHnEKdvlYPgvOmySISQq/KUFNWLKhwAiFKu2eCI uNLo5XxkJNXGbFkyxbXbQqKwgS8jJOBTsJwbPAbE2DIYTi+S3Bx+9Hd1Ig7FIhuPyBRP Pn+E62Jr9M6tSyGjfwSREQm0/+NeG9X5VN8VKEJfYRzj642rk73FFuP6X3DlJ+hVQBpJ r24jLqCHxdSoKPO5bZmrE1dXW1FWFBNwAC3uvLu5Xk4MzY16Rfldcy1I+wbHF2OaY197 f8Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ZfVvFutzzS6qtk6HEbI+EVKHR9qpgGiVCqJ6EVhU90M=; b=Vj5EyPIQdo4ergcqPb5seL6j64XhKpdI81COT6vUmVr0xcL8aSwBLguDq41ZFQEdog CXM441gDkPJ9pYuzsVmh2YUZ4Uz0H9NySEyO5pdth6mJdF04fIP+HC4D0f3wg2h2YmpU HuYjoz5AffnYjNe7f0J0YdwAXTmkUwuYDkkVMf2IGg+n3GFARQGXR1MxqxNTJ19XeMAF PM0TVCGsSGF1EQpTbhBNwJS70pLbRKygmHqlFkfdIOu9CIv4N3nZDdK2K9atpROIT0jC meofQjB8boSUC3IEthFiHWLYEXVtkRNNLbAK7ERu/en+J5+KrGG7L2WnuC7OeXxz5x04 IGPg== X-Gm-Message-State: APjAAAU/I67BMiO54QmrS4AvNDCQikKhKBFKsPp1BT+oz2DOMNl/Hoyt iHwJOh5XoRbdclWVt6KqGiN4ug== X-Google-Smtp-Source: APXvYqzOiGea8VQ/S46mxFLZE8Fujsxqe9V6wPttYO5gV96Lpel6ikgSmQzgRaVbGby3bzypyvnhHg== X-Received: by 2002:a0c:963c:: with SMTP id 57mr35935607qvx.166.1554908483824; Wed, 10 Apr 2019 08:01:23 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id v7sm5254000qkj.44.2019.04.10.08.01.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2019 08:01:23 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 7C4C51217E7; Wed, 10 Apr 2019 11:01:21 -0400 (-04) Date: Wed, 10 Apr 2019 11:01:21 -0400 From: Alvaro Herrera To: Michael Paquier Cc: cyberdemn@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15734: Walsender process crashing when executing SHOW ALL; Message-ID: <20190410150121.GA26340@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190410060427.GB2728@paquier.xyz> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Apr-10, Michael Paquier wrote: > After pondering more about this one, allowing replication to have the > same rights as a superuser in this case does not feel completely right > either as this is just a shortcut to bypass the syscache lookups > happening through is_member_of_role(). So attached is a much better > and simple idea: let's just use a transaction context when issuing the > SHOW command so as it is possible to perform cache lookups correctly. > This way, even a replication role is not able to see some parameters > except if the role is a member of pg_read_all_settings, which is more > consistent. > > This needs a backpatch down to v10. Thanks for tracking this down. I think we should have a few tests issuing SHOW ALL in a replication connection with various levels of privilege; it's annoying that this bug took two years to find. With that, special-purpose buildfarm members would tell us if we've made some mistake in transaction handling or whatever. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services