On 01/18/2014 02:42 AM, Amit Kapila wrote:
> On Sat, Jan 18, 2014 at 2:48 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> On 01/17/2014 03:15 PM, Tom Lane wrote:
>>
>>> The other possibility I was contemplating is that "export a const
>>> variable" doesn't actually work for some reason. We're not in the habit
>>> of doing that elsewhere, so I don't find that theory outlandish. Perhaps
>>> it could be fixed by adding PGDLLIMPORT to the extern, but on the whole
>>> I'd rather avoid the technique altogether.
> Is there any specific reason why adding PGDLLIMPORT for exporting
> const variables is not good, when we are already doing for other variables
> like InterruptHoldoffCount, CritSectionCount?
>
> On searching in code, I found that for few const variables we do
> extern PGDLLIMPORT. For example:
> extern PGDLLIMPORT const int NumScanKeywords;
> extern PGDLLIMPORT const char *debug_query_string;
>
[...]
> After adding PGDLLIMPORT to variables (ImmediateInterruptOK,
> MyBgworkerEntry, shm_mq_minimum_size) both the tests defined in
> contrib module passed.
>
>
> Attached patch fixes the problems related to test_shm_mq for me.
>
OK, I'll apply this later today unless there are strong objections. That
would get the buildfarm green again and we could argue about the rest
later if necessary.
cheers
andrew