Re: beta6 pg_restore core dumps - Mailing list pgsql-hackers

From Tom Lane
Subject Re: beta6 pg_restore core dumps
Date
Msg-id 1276.984847037@sss.pgh.pa.us
Whole thread Raw
In response to beta6 pg_restore core dumps  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: beta6 pg_restore core dumps
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> 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:
failedto 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;         } 


pgsql-hackers by date:

Previous
From: Samuel Sieb
Date:
Subject: Re: Performance monitor signal handler
Next
From: Tom Lane
Date:
Subject: Re: Performance monitor signal handler