Re: pg_upgrade code questions - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: pg_upgrade code questions
Date
Msg-id 20100514112403.A443.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: pg_upgrade code questions  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_upgrade code questions
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> wrote:

> > >> ==== 2. extern PGDLLIMPORT ====
> > >> pg_upgrade has own definitions of
> > >> extern PGDLLIMPORT Oid binary_upgrade_next_xxx
> > 
> > > The issue here is that you use PGDLLIMPORT where you are importing the
> > > variable, not where it is defined.  For example, look at
> > > 'seq_page_cost'.  You can see PGDLLIMPORT used where it is imported with
> > > 'extern', but not where is it defined.
> > 
> > Right.  Also we are intentionally not exposing those variables in any
> > backend .h file, because they are not meant for general use.  So the
> > "extern PGDLLIMPORT" isn't going to be in the main backend and has to
> > be in pg_upgrade.  This was discussed awhile ago when we put in those
> > variables, I believe.
> 
> Yes, this was discussed.

I wonder some compilers or linkers might hide unexported global variables
from postgres.lib as if they are declared with 'static' specifiers.
I'm especially worried about Windows and MSVC. So, if Windows testers
can see it works, there was nothing to worry about.

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Joseph Adams
Date:
Subject: JSON manipulation functions
Next
From: Fujii Masao
Date:
Subject: Re: wal_level and continuous archiving documentation