Thread: pg_dump fails with socket_not_open
Hi there folks, I've just had pg_dump fail on me for the first time ever, and I'm not sure why. It generates 24MB of dump before bombing out with: pg_dump: socket not open pg_dump: SQL command to dump the contents of table "activity_log" failed: PQendcopy() failed. pg_dump: Error message from server: socket not open pg_dump: The command was: COPY public.activity_log (<bunch of columns> TO stdout Are there any common reasons for seeing this? I'm fairly sure that the machine is ok hardware wise, and strangely enough, pg_dumpall works, so it's really curiosity and to set my mind at rest - any pointers appreciated. Thanks, Sarah.
Sarah Ewen <sarah@thaum.net> writes: > I've just had pg_dump fail on me for the first time ever, and I'm not > sure why. > It generates 24MB of dump before bombing out with: > pg_dump: socket not open > pg_dump: SQL command to dump the contents of table "activity_log" > failed: PQendcopy() failed. > pg_dump: Error message from server: socket not open > pg_dump: The command was: COPY public.activity_log (<bunch of columns> > TO stdout Is this repeatable? What shows up in the postmaster's log when it happens? What platform is this on, and what version of Postgres? regards, tom lane
Hi there Tom, thanks for your reply. >>pg_dump: socket not open >>pg_dump: SQL command to dump the contents of table "activity_log" >>failed: PQendcopy() failed. >>pg_dump: Error message from server: socket not open >>pg_dump: The command was: COPY public.activity_log (<bunch of columns> >>TO stdout > Is this repeatable? What shows up in the postmaster's log when it > happens? What platform is this on, and what version of Postgres? This is postgresql-7.4.6-1.FC2.2 running on RedHat Fedora Core 2. The logs don't reveal anything, and it happens consistently! It is a little disconcerting..by the sounds of things this is a fairly rare thing to see? Sarah.
Sarah Ewen <sarah@thaum.net> writes: >> Is this repeatable? What shows up in the postmaster's log when it >> happens? What platform is this on, and what version of Postgres? > This is postgresql-7.4.6-1.FC2.2 running on RedHat Fedora Core 2. > The logs don't reveal anything, and it happens consistently! The 7.4 RPMs' startup script sends the postmaster stderr to /dev/null :-(. To find out what the server sees as the problem, you need to either hack the startup script to send stderr someplace more useful, or adjust the configuration to send the postmaster's log messages to syslog. I would recommend doing one or the other since it's quite likely that the server-side view of the problem is different from what the client sees. > It is a little disconcerting..by the sounds of things this is a fairly > rare thing to see? Yes. I would like to get to the bottom of it. regards, tom lane
>>>>> "SE" == Sarah Ewen <sarah@thaum.net> writes: SE> Hi there folks, SE> I've just had pg_dump fail on me for the first time ever, and I'm not SE> sure why. SE> It generates 24MB of dump before bombing out with: SE> pg_dump: socket not open SE> pg_dump: SQL command to dump the contents of table "activity_log" SE> failed: PQendcopy() failed. SE> pg_dump: Error message from server: socket not open SE> pg_dump: The command was: COPY public.activity_log (<bunch of columns> SE> TO stdout Funny.... I just saw this for the very first time *ever* as well, overnight. I was dumping from a PG 8.0.1 server to PG 8.0.1 client. I, however, saw some ethernet interface timeouts in my server logs, which is very concerning to me. So it probably wasn't PG's fault, but I'm not ruling anything out just yet... i do see a bunch of socket not open errors for some reporting clients with no corresponding ethernet timeouts, so the log information is either conflicting or incomplete. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D. Khera Communications, Inc. Internet: khera@kciLink.com Rockville, MD +1-301-869-4449 x806