Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqIS7-0000Fy-J1 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Aug 2018 13:36:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqIS5-0005g7-SJ for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Aug 2018 13:36:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqIS5-0005g0-Ic for pgsql-hackers@lists.postgresql.org; Thu, 16 Aug 2018 13:36:37 +0000 Received: from mail-it0-x242.google.com ([2607:f8b0:4001:c0b::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fqIS2-0001Qm-BE for pgsql-hackers@lists.postgresql.org; Thu, 16 Aug 2018 13:36:37 +0000 Received: by mail-it0-x242.google.com with SMTP id h20-v6so6657115itf.2 for ; Thu, 16 Aug 2018 06:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=0mVPdntn5SveA7NeBQ1+znr81y+pEskY1xtvYycJ7+A=; b=EpULnx+ll4i3J1REy4n7a9xm5XrMTSYgoy5BdkhwjZhwk4hN9mSWQQxNGboq+Ost7V 79sGdluh3F+cYE7B2fpoQsxUvvvwjq/RuiSevoGX/muolpOrMu4bPMq/pS8S5js8BCSI CLyVGMa9o2QgVhsnOYiKO02uS8Vm6bMuIA8dBQQ7eooxi9IjOYLRAHc0mQPmBokOa8Zo LgfZnWVu5YjLgWDRbi0bQYV58JgvpOtPU4YOzvos0EONtX/HWJc28OhATbcXULrSgC/c aEI+A0RAwJ3FqS7GBs77nq5BMQGXbv8kfftM5QLcJMfPvV2VLQpgtfDfCsuKBFs3a05v cdPg== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=0mVPdntn5SveA7NeBQ1+znr81y+pEskY1xtvYycJ7+A=; b=rkPwKcdxbU853RzhdCUhzk0G5AfqF06JP+V+jnxed+q916f1IasPdI3E1ikuMCY8HX gIapXcC8whnaC1odDv6oIduJFpKd3ApHCPPf4X/SqqdNL7F5D1VJkefDFezjA6LiOY1W 2id014rb2zDabrdm4PtfoZCXA8AgqbhZmggXPwQ5E3ssdQoRfqvPyx5GVM2JFCeufqVA mCasrvj1XEpF6vbVENYtgLWTXwKNtiyl01e9Ta+PiBCTE7s+3QpSa/b9e5fopelaaW0V UqrieWf5rXKVejZHwOL3FTl1C2HtxysbH/tnsMvEx3Eho3hEaDMS+29vZ3GmGGHDA6+J j6pQ== X-Gm-Message-State: AOUpUlHPhJ8cO3eEDht7IkPQRM/p5Y4Lcz812rilb1iI/dQJjM/ls4iW i+ZVDG21vKg8XVydx2RSwAJ4zdTHs7M= X-Google-Smtp-Source: AA+uWPw9eS1jVlLIDBYt2QeC/DChGjXcvQv7s8ONfQN4nMhmKEGYMDa0TuBkREJ38JEnn/9yoAxSnA== X-Received: by 2002:a02:970a:: with SMTP id x10-v6mr25486064jai.137.1534426591764; Thu, 16 Aug 2018 06:36:31 -0700 (PDT) Received: from [10.0.0.9] (108-72-92-36.lightspeed.livnmi.sbcglobal.net. [108.72.92.36]) by smtp.gmail.com with ESMTPSA id b195-v6sm505817itc.42.2018.08.16.06.36.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 06:36:30 -0700 (PDT) Subject: Re: docs: note ownership requirement for refreshing materialized views To: Tom Lane Cc: Michael Paquier , pgsql-hackers@lists.postgresql.org References: <745abbd2-a1a0-ead8-2cb2-768c16747d97@gmail.com> <20180816010355.GH3681@paquier.xyz> <13833.1534392450@sss.pgh.pa.us> From: Dian Fay Message-ID: Date: Thu, 16 Aug 2018 09:36:29 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <13833.1534392450@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------C4DA8558D5D785457E35A099" Content-Language: en-HK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------C4DA8558D5D785457E35A099 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Fair enough! Here's a new version. On 8/16/18 12:07 AM, Tom Lane wrote: > Dian Fay writes: >> I feel resorting to the infinitive asks more involvement of the reader, >> while leading with the responsible role(s) helps shortcut the process of >> determining whether what follows is relevant. Efficiency is always a >> virtue, although this is admittedly more than a little academic for a >> one-sentence addition! > I think Michael's point is that this formulation is unlike what we have > elsewhere for similar statements. Looking around, it seems like the > typical phraseology would be more like > > "You must own the materialized view to use REFRESH MATERIALIZED VIEW." > > It is not really customary to call out the superuser exception > explicitly, because if we did, we'd be mentioning superusers in every > other sentence. The point is covered by existing documentation that > says something to the effect of superusers bypassing all permissions > checks; and I think there's also a statement somewhere about superusers > implicitly being members of every role, which is a different way of > arriving at the same conclusion. > > In any case, it's definitely an oversight that the REFRESH reference > page fails to address permissions at all. +1 for adding something. > > regards, tom lane --------------C4DA8558D5D785457E35A099 Content-Type: text/x-patch; name="0001-docs-note-ownership-requirement-for-refreshing-mater.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-docs-note-ownership-requirement-for-refreshing-mater.pa"; filename*1="tch" diff --git a/doc/src/sgml/ref/refresh_materialized_view.sgml b/doc/src/sgml/ref/refresh_materialized_view.sgml index 9cf01a25a5..f001a661e1 100644 --- a/doc/src/sgml/ref/refresh_materialized_view.sgml +++ b/doc/src/sgml/ref/refresh_materialized_view.sgml @@ -91,6 +91,10 @@ REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] name Notes + + You must own the materialized view in order to use REFRESH MATERIALIZED VIEW. + + While the default index for future --------------C4DA8558D5D785457E35A099--