Re: C function migration from 9.2 to 9.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Omotayo Akinde <michaeloa(at)met(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: C function migration from 9.2 to 9.5
Date: 2016-03-03 16:50:28
Message-ID: 22600.1457023828@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Omotayo Akinde <michaeloa(at)met(dot)no> writes:
> We've been having a Postgresql database with some custom C functionality
> happily running for many years now. It's been running on 9.2, and we wish
> to upgrade this to the latest version. However, we're seeing some issues
> with the database process crashing each time.

Like Pavel, I can't see anything wrong with that code --- it's not quite
according to PG project style, but it certainly looks like it does what
it needs to. I think he's right to suspect some inconsistency in your
coding environment. One concrete idea worth considering is that maybe
you are compiling with headers that postdate commit 3f8c8e3c6 et al and
trying to use the code in a database that predates that. That'd result
in successfully compiling a call to a nonexistent core function, which
might end up as a crash depending on what your dynamic linker does
about it.

What exactly does the crash look like --- anything interesting in the
postmaster log? (If your logging setup fails to capture postmaster
stderr, now would be a good time to fix that.) Have you tried to
get a back-trace with gdb?

regards, tom lane

PS: for reference, this is the patch I'm wondering about:

Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Branch: master Release: REL9_4_BR [3f8c8e3c6] 2014-05-01 15:19:06 -0400
Branch: REL9_3_STABLE Release: REL9_3_5 [b72e90bc3] 2014-05-01 15:19:10 -0400
Branch: REL9_2_STABLE Release: REL9_2_9 [8c43980a1] 2014-05-01 15:19:14 -0400
Branch: REL9_1_STABLE Release: REL9_1_14 [db1fdc945] 2014-05-01 15:19:17 -0400
Branch: REL9_0_STABLE Release: REL9_0_18 [7a4f114f3] 2014-05-01 15:19:20 -0400
Branch: REL8_4_STABLE Release: REL8_4_22 [70debcf09] 2014-05-01 15:19:23 -0400

Fix failure to detoast fields in composite elements of structured types.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rémi Cura 2016-03-03 17:15:32 Re: bloated postgres data folder, clean up
Previous Message Rader, David 2016-03-03 16:02:25 Re: Re: could not migrate 8.0.13 database with large object data to 9.5.1