pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_dump failed with error code 255, but I don't see why
4+ messages / 3 participants
[nested] [flat]

* pg_dump failed with error code 255, but I don't see why
@ 2022-09-22 14:19  Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Ron @ 2022-09-22 14:19 UTC (permalink / raw)
  To: pgsql-general


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.

But however much I search the log file for strings like ERROR, FATAL, WARN, 
INFO, and "archiver", I don't see any problems.

What else should I look for?

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump failed with error code 255, but I don't see why
@ 2022-09-22 14:34  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2022-09-22 14:34 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general

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?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump failed with error code 255, but I don't see why
@ 2022-09-22 14:56  Ron <ronljohnsonjr@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Ron @ 2022-09-22 14:56 UTC (permalink / raw)
  To: pgsql-general

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 ...".

-- 
Angular momentum makes the world go 'round.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_dump failed with error code 255, but I don't see why
@ 2022-09-23 04:02  Jerry Sievers <gsievers19@comcast.net>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Jerry Sievers @ 2022-09-23 04:02 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-general

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$ 





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-09-23 04:02 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 14:19 pg_dump failed with error code 255, but I don't see why Ron <ronljohnsonjr@gmail.com>
2022-09-22 14:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-09-22 14:56   ` Ron <ronljohnsonjr@gmail.com>
2022-09-23 04:02     ` Jerry Sievers <gsievers19@comcast.net>

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