Re: UPDATE: pg_dump fails due to invalid memory request

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Morgan Kita <mkita(at)verseon(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-novice(at)postgresql(dot)org
Subject: Re: UPDATE: pg_dump fails due to invalid memory request
Date: 2005-09-03 16:52:44
Message-ID: 20050903165244.GA87455@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

[Please don't change the Subject header when continuing the same
thread; it messes up some threaded displays.]

On Fri, Sep 02, 2005 at 08:48:34PM -0700, Morgan Kita wrote:
> >> Now the only thing I can think of is that this particular table has 2
> >> custom data types that are both toastable.
>
> > [ raised eyebrow... ] Then it could also be a symptom of a garden
> > variety bug in your custom datatype code. Have you tried getting
> > a stack trace from errfinish() to see exactly where the complaint
> > is being raised?
>
> Bingo it is the custom datatype code. The curious things is this...
> When I do the dump it calls COPY... which balks on an invalid memory
> request. However, when I select the same rows that cause pg_dump
> to crash, I have absolutely no problem. I have checked the output
> from the select statements and the data is identical to what went
> in.

What happens if you use "pg_dump --inserts" or if you issue a COPY
command directly? Have you done what Tom suggested and tried to
get a strack trace on the backend?

> So obviously something is wrong with my code... but what should
> I do?

Post your data type's output function and we'll take a look.
The CREATE TYPE statement might also be useful.

> Obviously I will need to do more testing and try to debug,
> but isn't it odd that I can select the data but not copy from it?

That seems odd to me; maybe Tom or somebody else who knows PostgreSQL
internals can explain why that might happen.

--
Michael Fuhr

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2005-09-03 17:17:19 Re: Debian PostgreSQL Install
Previous Message Stephan Szabo 2005-09-03 15:47:31 Re: Privileged CUD Access via Stored Procs