Re: pg_dump - lost synchronization with server: got message type "d", length 6036499 - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump - lost synchronization with server: got message type "d", length 6036499
Date
Msg-id 12012.1215012908@sss.pgh.pa.us
Whole thread Raw
In response to pg_dump - lost synchronization with server: got message type "d", length 6036499  (Klint Gore <kgore4@une.edu.au>)
Responses Re: pg_dump - lost synchronization with server: got message type "d", length 6036499
List pgsql-general
Klint Gore <kgore4@une.edu.au> writes:
> Can someone shed some light on what's happening here?
> D:\backups>pg_dump -Z 9 -Fc -C -U postgres -f sheepcrc\dbback.dmp sheepcrc2
> pg_dump: Dumping the contents of table "uploadeddatafiles" failed:
> PQgetCopyData
> () failed.
> pg_dump: Error message from server: lost synchronization with server:
> got messag
> e type "d", length 6036499

Hmm ... I think what is actually happening here is that pg_dump doesn't
have enough memory available to buffer the message.  The only places
where libpq could report that error text with those parameters are
where pqCheckInBufferSpace has failed to enlarge the input buffer
sufficiently.  Per the code comment:

                /*
                 * XXX add some better recovery code... plan is to skip over
                 * the message using its length, then report an error. For the
                 * moment, just treat this like loss of sync (which indeed it
                 * might be!)
                 */

6 meg doesn't seem particularly enormous though.  Are you running
pg_dump under some especially restrictive user limits?  Maybe it's
dying here after having leaked a lot of memory for some other reason
--- try watching the pg_dump process size while it runs.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg crashing
Next
From: Tom Lane
Date:
Subject: Re: pg crashing