Re: [COMMITTERS] pgsql: Don't use OidIsValid to check the return value of

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [COMMITTERS] pgsql: Don't use OidIsValid to check the return value of
Date: 2008-12-20 15:55:56
Message-ID: 17982.1229788556@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

heikki(at)postgresql(dot)org (Heikki Linnakangas) writes:
> Don't use OidIsValid to check the return value of transformGenericOptions,
> because transformGenericOptions returns an array, not an Oid. I'm not
> sure if this fixes the crashes seen in buildfarm, but it should be fixed
> anyway.

Definitely a necessary fix, but you missed what I think is actually
causing the crashes:

if (PointerIsValid(DatumGetPointer(datum)))
! repl_val[Anum_pg_foreign_data_wrapper_fdwoptions - 1] = ObjectIdGetDatum(datum);

should be

if (PointerIsValid(DatumGetPointer(datum)))
! repl_val[Anum_pg_foreign_data_wrapper_fdwoptions - 1] = datum;

ObjectIdGetDatum probably is zeroing the high-order half of the pointer
datum.

I committed this along with some other cosmetic fixes.

Somebody still needs to fix the MSVC build scripts...

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-12-20 15:58:15 Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Previous Message Tom Lane 2008-12-20 15:51:28 pgsql: Fix various confusions of pointers and OIDs, unsafe assumptions

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-12-20 15:58:15 Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Previous Message Markus Wanner 2008-12-20 15:48:19 Re: Sync Rep: First Thoughts on Code