Tatsuo Ishii <[EMAIL PROTECTED]> writes:
> pg_restore crushes if dump data includes large objects...

This is probably the same problem that Martin Renters reported
yesterday.  I have a patch that seems to fix it on my machine,
but I haven't heard back from Martin whether it solves his case
completely.  In particular, he said something about memory leaks...

                        regards, tom lane


*** pg_backup_custom.c.orig     Fri Feb  9 17:32:26 2001
--- pg_backup_custom.c  Fri Mar 16 17:24:59 2001
***************
*** 521,531 ****
                if (blkLen > (ctx->inSize - 1)) {
                        free(ctx->zlibIn);
                        ctx->zlibIn = NULL;
!                       ctx->zlibIn = (char*)malloc(blkLen);
                        if (!ctx->zlibIn)
                                die_horribly(AH, "%s: failed to allocate decompression 
buffer\n", progname);
  
!                       ctx->inSize = blkLen;
                        in = ctx->zlibIn;
                }
  
--- 521,531 ----
                if (blkLen > (ctx->inSize - 1)) {
                        free(ctx->zlibIn);
                        ctx->zlibIn = NULL;
!                       ctx->zlibIn = (char*)malloc(blkLen+1);
                        if (!ctx->zlibIn)
                                die_horribly(AH, "%s: failed to allocate decompression 
buffer\n", progname);
  
!                       ctx->inSize = blkLen+1;
                        in = ctx->zlibIn;
                }
  

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to