| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
| Cc: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [Patch] New psql prompt substitution %r (m = master, r = replica) |
| Date: | 2016-08-11 15:51:30 |
| Message-ID: | 21582.1470930690@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> On 8/11/16 6:04 AM, Aleksander Alekseev wrote:
>> Suggested patch introduces an %r substitution in psql's prompt. This
>> substitution allows to display whether user is connected to master or
>> replica right in a prompt.
> In the near future, there will (probably) be a lot more variants about
> what it means to be a master or a replica. There will be logical
> replication, where you could be a publisher of something and a consumer
> of something else. You could even be a logical consumer but a physical
> master. So a global binary facility is probably not very forward
> looking and will lead to confusion.
Also, the patch as given is broken since it fails to account for the
server being promoted while a psql session is open.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Janes | 2016-08-11 15:59:15 | Re: new autovacuum criterion for visible pages |
| Previous Message | Peter Eisentraut | 2016-08-11 15:45:19 | Re: [Patch] New psql prompt substitution %r (m = master, r = replica) |