Re: [HACKERS] amcheck (B-Tree integrity checking tool) - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] amcheck (B-Tree integrity checking tool)
Date
Msg-id CA+TgmoYGUoDocEfQ4o-+M76ngg-3WHKuTtz9eDbz5aQOTpErJw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] amcheck (B-Tree integrity checking tool)  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] amcheck (B-Tree integrity checking tool)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Feb 9, 2017 at 3:05 AM, Andres Freund <andres@anarazel.de> wrote:
>> +#define CHECK_SUPERUSER() { \
>> +             if (!superuser()) \
>> +                     ereport(ERROR, \
>> +                                     (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), \
>> +                                      (errmsg("must be superuser to use verification functions")))); }
>
> Please make this either a function or just copy - the macro doesn't buy
> us anything except weirder looking syntax.

Better yet, remove the check altogether and just revoke access from
public.  Then the default policy is superuser-only, but the DBA can
grant access to who they wish.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] [PATCH] Rename pg_switch_xlog to pg_switch_wal
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] amcheck (B-Tree integrity checking tool)