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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Klint Gore <kgore4(at)une(dot)edu(dot)au>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump - lost synchronization with server: got message type "d", length 6036499
Date: 2008-07-02 15:35:08
Message-ID: 12012.1215012908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Klint Gore <kgore4(at)une(dot)edu(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-07-02 15:52:19 Re: pg crashing
Previous Message Felipe de Jesús Molina Bravo 2008-07-02 15:19:00 Re: SRF written in C