Bug#953157: improve brittle pg_lsclusters parsing

2020-03-05 Thread Tomas Pospisek
On Thu, 5 Mar 2020, Christoph Berg wrote: Re: Tomas Pospisek 2020-03-05 <158341012952.22047.14835993299149410230.reportbug@hier> if for whatever reason a cluster status line will contain the string `Port`, then that line will be filtered out. I instead suggest to do: PORT=$(($(pg_lsclust

Bug#953157: improve brittle pg_lsclusters parsing

2020-03-05 Thread Christoph Berg
Re: Tomas Pospisek 2020-03-05 <158341012952.22047.14835993299149410230.reportbug@hier> > if for whatever reason a cluster status line will contain the string > `Port`, then that line will be filtered out. > > I instead suggest to do: > > PORT=$(($(pg_lsclusters | tail -n +2 | awk '{print $3}

Bug#953157: improve brittle pg_lsclusters parsing

2020-03-05 Thread Tomas Pospisek
Source: patroni Version: 1.6.4-1 Severity: minor Tags: patch When parsing `pg_lsclusters` output, `pg_createconfig_patroni` does: PORT=$(($(pg_lsclusters | awk '{print $3}' | grep -v Port | sort -n | tail -1) + 1)) if for whatever reason a cluster status line will contain the string `Port`,