Re: C function fails afeter create extension but ok after reconnect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Woodbridge <imaptools(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: C function fails afeter create extension but ok after reconnect
Date: 2013-05-20 01:36:53
Message-ID: 12140.1369013813@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Woodbridge <imaptools(at)gmail(dot)com> writes:
> I have a C function that works fine in all cases except if I try to run
> it after create extension without reconnecting to the database.

There's not nearly enough info here to diagnose the problem, but
if I had to bet I'd bet on a memory-management bug that just
accidentally fails to fail in the freshly-reconnected case.

The first thing you should do, if you didn't already, is to build
the backend with --enable-cassert to turn on assorted memory allocation
checks. That might make the bug happen consistently, which would be
a good thing. After that, I'd try capturing a stack trace from the
point of the error report, in hopes of narrowing down what code is
causing the problem.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Boreham 2013-05-20 05:12:09 Re: Deploying PostgreSQL on CentOS with SSD and Hardware RAID
Previous Message Toby Corkindale 2013-05-20 01:19:20 Re: Deploying PostgreSQL on CentOS with SSD and Hardware RAID