From: Jerry Sievers <gsievers19@comcast.net>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: pg_dump failed with error code 255, but I don't see why
Date: Thu, 22 Sep 2022 23:02:44 -0500
Message-ID: <m0r102ohzv.fsf@comcast.net> (raw)
In-Reply-To: <992001c5-0241-c4b8-7788-7ea1954db7ae@gmail.com>
References: <239fa759-d0f7-7357-7731-854b33c3749f@gmail.com>
<1397197.1663857240@sss.pgh.pa.us>
<992001c5-0241-c4b8-7788-7ea1954db7ae@gmail.com>
Ron <ronljohnsonjr@gmail.com> writes:
> On 9/22/22 09:34, Tom Lane wrote:
>
>> Ron <ronljohnsonjr@gmail.com> writes:
>>> v9.6.2.23
>>> I always run pg_dump with the --verbose option, and the bash script echos
>>> $?, so there's a 25,664 line log file for me to examine which explicitly
>>> shows the return code.
>> A quick search of the 9.6 pg_dump source code shows that it only
>> ever calls exit() with values 0 or 1. 255 would have to be coming
>> from some outside factor. You sure your shell script isn't
>> misbehaving and corrupting the reported return code?
>
> Good to know. The RC might be from ssh (the actual command being "ssh
> postgres@HOSTNAME pg_dump ...".
FWIW, here's what my ssh man page says, and a contrived example.
So it seems your ssh call itself borked for some reason perhaps.
EXIT STATUS
ssh exits with the exit status of the remote command or with 255 if an
error occurred.
tmp$ ssh localhost false; echo $?
1
tmp$ ssh no-such-host true; echo $?
ssh: Could not resolve hostname no-such-host: nodename nor servname provided, or not known
255
tmp$
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: gsievers19@comcast.net, ronljohnsonjr@gmail.com
Subject: Re: pg_dump failed with error code 255, but I don't see why
In-Reply-To: <m0r102ohzv.fsf@comcast.net>
References: <239fa759-d0f7-7357-7731-854b33c3749f@gmail.com> <1397197.1663857240@sss.pgh.pa.us> <992001c5-0241-c4b8-7788-7ea1954db7ae@gmail.com> <m0r102ohzv.fsf@comcast.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox