Re: Add %r substitution for psql prompts to show recovery status

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: robertmhaas(at)gmail(dot)com
Cc: ian(dot)barwick(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add %r substitution for psql prompts to show recovery status
Date: 2017-12-08 00:54:48
Message-ID: 20171208.095448.1318946561859435638.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Wed, Dec 6, 2017 at 9:19 PM, Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com> wrote:
>> Note this substitution sends a "pg_is_in_recovery()" query to the server
>> each time it's encountered; unless there's something I'm overlooking I
>> think that's the only reliable way to determine current recovery status.
>
> That seems kinda painful.
>
> And what happens in an aborted transaction?

Yeah. I think we need some from help backend for this. For example, a
parameter status message can be used here. If PostgreSQL moves to the
recovery state or vice versa, PostgreSQL sends the parameter status
message to frontend.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-12-08 00:57:26 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Previous Message Amit Langote 2017-12-08 00:46:43 Re: [Sender Address Forgery]Re: [HACKERS] path toward faster partition pruning