Re: unexpected EOF on client connection during pg_dumpall - Mailing list pgsql-admin

From Tom Lane
Subject Re: unexpected EOF on client connection during pg_dumpall
Date
Msg-id 28964.1374622184@sss.pgh.pa.us
Whole thread Raw
In response to unexpected EOF on client connection during pg_dumpall  ("Arnold, Sandra L." <arnoldsl@ornl.gov>)
List pgsql-admin
"Arnold, Sandra L." <arnoldsl@ornl.gov> writes:
> I am currently getting a "unexpected EOF on client connection" when
> running pg_dumpall from a bash shell script in cron.  I have looked
> online to see if anyone else is having or have had this problem
> without any luck.  I am hoping someone can point me in the right
> direction to determine what is happening.  When I run the command
> manually it works.

That's really odd.  The only theory that comes to mind is that there's
something different about the execution environment under cron, but it's
pretty hard to see how that would allow pg_dumpall to get as far as the
log shows and then crash.  For instance, if you had a LD_LIBRARY_PATH
setting in your manual environment that wasn't shared by cron, that
could lead to pg_dumpall picking up the wrong copy of libpq.so and then
crashing --- but you'd really expect such a failure to happen at or near
the start of execution.

What I'd try next is (1) adding an "env" command to the cron shell
script so you can compare that environment to your regular shell,
and (2) adding "ulimit -c unlimited" to the shell script in hopes
of collecting a core dump you could get a stack trace from.

            regards, tom lane


pgsql-admin by date:

Previous
From: "Arnold, Sandra L."
Date:
Subject: unexpected EOF on client connection during pg_dumpall
Next
From: Bruce Momjian
Date:
Subject: Re: Dump/Reload pg_statistic to cut time from pg_upgrade?