Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)

From: "Haroon (dot)" <contact(dot)mharoon(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Haroon <muhammad(dot)haroon(at)2ndquadrant(dot)com>, Umair Shahid <umair(dot)shahid(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)
Date: 2016-06-29 22:08:37
Message-ID: CAGQkGW3z4OsZLMua+bXty9gAU3Z=eMOxKvXWd7tLOjaPoT6uTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 25, 2016 at 6:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>
> If that is the explanation, I'm suspicious that it's got something to do
> with the interaction of a static inline-able (single-call-site) function
> and taking the address of a formal parameter. We certainly have multiple
> other instances of each thing, but maybe not both at the same place.
> This leads to a couple of suggestions for dodging the problem:
>
> 2. Don't pass the original formal parameter to
> get_foreign_key_join_selectivity, ie do something like
>
> static double
> calc_joinrel_size_estimate(PlannerInfo *root,
> RelOptInfo *outer_rel,
> RelOptInfo *inner_rel,
> double outer_rows,
> double inner_rows,
> SpecialJoinInfo *sjinfo,
> - List *restrictlist)
> + List *orig_restrictlist)
> {
> JoinType jointype = sjinfo->jointype;
> + List *restrictlist = orig_restrictlist;
> Selectivity fkselec;
> Selectivity jselec;
> Selectivity pselec;
>
>
The problem appears to be related to 'taking the address of a formal
parameter'. NOT passing the original formal parameter to
get_foreign_key_join_selectivity fixes it (dodges the problem) on VS2013.
Resulting binaries seem to work fine as initdb doesn't experience child
process crash anymore. 'vcregress check' does not report any failures also.

Anyways, We have decided to use VS2015 tool chain for 9.6beta2 release.

Thanks everyone for the valuable input and help. Appreciate it!

Regards,
Haroon

--
Haroon http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-06-29 22:33:57 Re: pgbench unable to scale beyond 100 concurrent connections
Previous Message Michael Paquier 2016-06-29 21:55:20 Re: primary_conninfo missing from pg_stat_wal_receiver