Re: beta6 pg_restore core dumps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: beta6 pg_restore core dumps
Date: 2001-03-17 16:37:17
Message-ID: 1276.984847037@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)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: 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;
}

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-03-17 16:48:22 Re: Performance monitor signal handler
Previous Message Samuel Sieb 2001-03-17 16:21:13 Re: Performance monitor signal handler