Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YcvyU-0003ex-Vz for pgsql-admin@arkaria.postgresql.org; Tue, 31 Mar 2015 13:12:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YcvyU-00066F-B0 for pgsql-admin@arkaria.postgresql.org; Tue, 31 Mar 2015 13:12:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YcvyS-00063C-KO for pgsql-admin@postgresql.org; Tue, 31 Mar 2015 13:12:56 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YcvyP-0004xA-AH for pgsql-admin@postgresql.org; Tue, 31 Mar 2015 13:12:54 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 58E585F79F; Tue, 31 Mar 2015 09:12:52 -0400 (EDT) Date: Tue, 31 Mar 2015 09:12:52 -0400 From: Stephen Frost To: jesse.waters@gmail.com Cc: pgsql-admin@postgresql.org Subject: Re: Permission select pg_stat_replication Message-ID: <20150331131252.GI3663@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GACvPnKyN03uhzyl" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-46-generic (x86_64) X-Uptime: 09:09:37 up 11 days, 18:58, 3 users, load average: 0.08, 0.09, 0.07 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --GACvPnKyN03uhzyl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Jesse, * jesse.waters@gmail.com (jesse.waters@gmail.com) wrote: > Could someone tell me what permission is required to > select * from pg_stat_replication; ? Currently, you're required to have superuser rights. > I like to setup a monitor to query database with minimal privileges necessary. I agree 110% and am actively working to fix exactly this issue. I hope to have a patch in the next day or so which will allow you to GRANT rights to such a monitor user which will allow that user to see all the contents of pg_stat_replication. One thing which would be really great is if you have time to test with the patch I'm working up (it's against 9.5, but this is strictly functionality testing and should be just in in a dev/test environment, I wouldn't suggest running 9.5 in production, of course!). Thanks! Stephen --GACvPnKyN03uhzyl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJVGp1TAAoJEO1sijiDR2RVQbsP+gJq61m11CXKCzLQviT1MaE0 E2TfFUmDX+grZat9AXXdJsz9AeMj6KPJlMNpGu+vjHiaHEFMmZXQ2EmHG1i4xAtl zYA60F/otHRgtx68zO+5Xsqh58JoT/EBpkiWCUfb/ZBSHrJmvGF9/uMh5O5sr645 P88XoZaaNox4ZPF9VCBFhIctyIoEiEp9J4Gz/saBM5w1mTv7obMiKchXsyWkppXC oqWASDiQVhkzvPOWQobaVVJIFQj3sXTuRmaVPf7MUe+70XmuBrLJiZbqW2ZLYvb+ GzAlLlkhg+saZE8dZP8GVVLMtEQve4EIis6qYd6jGy6qVDcReCbJF4nC6PtGFJMM ykbjhdpFOd4dz/SWi0nQ0pBzge5AXGRu4NkBEqQ9vpwFdiXUU5hNrGHUqPyTplS9 pSRSk32ggltlfJiEOA4eHLixQebNek+pM6zMnaOsm1ppM9RmdMNiURjlvlY7fMTP VuOTmCnhQuXIoeeMrillrjNn7rIujdNi+NWV94tX2J+9GWr6yUOE9yJKW3pdxQDf 5/LC6r63K8Iz2alX2XSHjviom4rLhhfnqxQpWVsP/O7z3OIA/BGXD0FTUKSXY7ln GET5jirE4JoCM7RO2mcyPinXJWaodDK2q23224EB03R/mWhGDognZUN1gP/LqFpJ w/kjerBXhukyFBkYx+Fx =0EVz -----END PGP SIGNATURE----- --GACvPnKyN03uhzyl--