Re: UPDATE: pg_dump fails due to invalid memory request

From: "Morgan Kita" <mkita(at)verseon(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: UPDATE: pg_dump fails due to invalid memory request
Date: 2005-09-03 20:48:49
Message-ID: 08B420FF5BF7BC42A064212C2EB7688017E518@neutron.verseon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hehe, funny thing is I realized that after I went home last night... For
some reason I took out my calls to PG_DETOAST_DATUM at some point... I
havn't a clue as to why, but oh well.

I need to go test this to verify, but I am 90% sure that is the problem.

Can someone explain to me why one works and not the other without
PG_DETOAST_DATUM?

Also can someone tell me how to easily tell how much data for a
particular table is being toasted?

Thanks guys!

Morgan

-----Original Message-----
From: Michael Fuhr [mailto:mike(at)fuhr(dot)org]
Sent: Saturday, September 03, 2005 1:05 PM
To: Morgan Kita
Cc: Tom Lane; pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] UPDATE: pg_dump fails due to invalid memory
request

On Sat, Sep 03, 2005 at 10:52:44AM -0600, Michael Fuhr wrote:
> On Fri, Sep 02, 2005 at 08:48:34PM -0700, Morgan Kita wrote:
> > 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.

In tests I see different behavior between SELECT and COPY if the
type's output function doesn't call PG_DETOAST_DATUM on its argument:
SELECT returns the correct data but COPY doesn't. Have you neglected
to call PG_DETOAST_DATUM?

--
Michael Fuhr

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message me 2005-09-03 21:25:52 problems when comparing text with special chars
Previous Message Michael Fuhr 2005-09-03 20:05:23 Re: UPDATE: pg_dump fails due to invalid memory request