Re: pg_upgrade code questions

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: pg_upgrade code questions
Дата
Msg-id AANLkTilOUK42XbN_5p3mghtbDDLW3HhKa6-_RwvWESgB@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_upgrade code questions  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On Fri, May 14, 2010 at 5:34 AM, Bruce Momjian <bruce@momjian.us> wrote:
> Takahiro Itagaki wrote:
>>
>> 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.
>
> Yes, none of the variables pg_upgrade is referencing are 'static', and
> Magnus tested MSVC and checked MinGW compiles.

Just to be clear, I only verified that it *built*, didn't have time to
check if it actually *worked*.


-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: pg_upgrade code questions
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Japanies translation breaks solaris build