Re: pgsql: Extend the abilities of libpq's target_session_attrs parameter.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Extend the abilities of libpq's target_session_attrs parameter.
Date: 2021-03-03 03:54:15
Message-ID: YD8IZ9OKfUf9X1eF@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Mar 03, 2021 at 01:17:57AM +0000, Tom Lane wrote:
> Extend the abilities of libpq's target_session_attrs parameter.
>
> In addition to the existing options of "any" and "read-write", we
> now support "read-only", "primary", "standby", and "prefer-standby".
> "read-write" retains its previous meaning of "transactions are
> read-write by default", and "read-only" inverts that. The other
> three modes test specifically for hot-standby status, which is not
> quite the same thing. (Setting default_transaction_read_only on
> a primary server renders it read-only to this logic, but not a
> standby.)

pgperlcritic is complaining after this commit:
./src/test/recovery/t/001_stream_rep.pl: Variable declared in
conditional statement at line 88, column 2. Declare variables outside
of the condition. ([Variables::ProhibitConditionalDeclarations]
Severity: 5)

perlcritic is picky on this one, but you could just separate that
stuff into two lines like in the attached.
--
Michael

Attachment Content-Type Size
recovery-perlcritic.patch text/x-diff 589 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-03-03 04:14:26 pgsql: Add sort_template.h for making sort functions.
Previous Message Amit Kapila 2021-03-03 02:12:56 pgsql: Add option to enable two_phase commits via pg_create_logical_rep