Re: Possibility to disable `ALTER SYSTEM`

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Gabriele Bartolini <gabriele(dot)bartolini(at)enterprisedb(dot)com>
Cc: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possibility to disable `ALTER SYSTEM`
Date: 2023-09-13 17:10:16
Message-ID: CAKAnmmJv_ZHKo0tsxfd2+QdszcOMMkeTpAbrA=rCh4H5DgmyFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Seems to be some resistance to getting this in core, so why not just use an
extension? I was able to create a quick POC to do just that. Hook into PG
and look for AlterSystemStmt, throw a "Sorry, ALTER SYSTEM is not currently
allowed" error. Put into shared_preload_libraries and you're done. As a
bonus, works on all supported versions, so no need to wait for Postgres 17
- or Postgres 18/19 given the feature drift this thread is experiencing :)

Cheers,
Greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-09-13 17:29:43 Re: Eliminate redundant tuple visibility check in vacuum
Previous Message Nathan Bossart 2023-09-13 16:59:04 Re: Add 'worker_type' to pg_stat_subscription