Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Date: 2019-06-24 19:06:25
Message-ID: 20190624190625.GA10524@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Jun-24, Robert Haas wrote:

> On Sat, Jun 22, 2019 at 5:13 PM Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > All that said, whatever code it is that we write for pg_basebackup to do this properly should go into our client side library, so other tools can leverage that and avoid having to write it themselves.
>
> That is probably only going to help people who are writing in C (or
> maybe some close family member) and a lot of tools for managing
> PostgreSQL will be written in scripting languages.

But we already have ALTER SYSTEM, so why do we need to write it again?
You just need to check whether the system is running: if it is, connect
and do "ALTER SYSTEM". If it isn't, do `echo ALTER SYSTEM | postgres
--single`. Maybe we can embed smarts to do that in, say, pg_ctl; then
everybody has access to it.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-06-24 19:12:09 Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Previous Message Tom Lane 2019-06-24 19:05:30 Re: BUG #15865: ALTER TABLE statements causing "relation already exists" errors when some indexes exist