Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Date: 2010-12-15 14:20:36
Message-ID: 4D08CEB4.9030607@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/15/2010 01:01 AM, Tom Lane wrote:
> Craig Ringer<craig(at)postnewspapers(dot)com(dot)au> writes:
>> I've attached an updated patch that fixes a failure when compiling on
>> gcc/linux. The no-op inline installCrashDumpHandler() for unsupported
>> platforms was not declared static, so it was not being optimized out of
>> objects it wasn't used in and was causing symbol collisions during linkage.
>
> Why in the world would you get involved in that portability mess for a
> function that is called only once? There's no possible performance
> justification for making it inline.

The main concern I heard voiced when first suggesting this was about
performance. Given that concern, if I could make it a no-op on
unix/linux I thought that worth doing.

I'm _much_ happier with a simple, non-ifdef'd extern function
declaration and compilation of an empty function body on unsupported
platforms. Given how concerned everyone was about *any* effect on
backend startup, though, I was concerned that'd be turned down as
unnecessary bloat.

I've done it a nicer way now, and will post the updated patch once I've
had a chance to re-test it on my Windows dev box.

> I'm also wondering why you have got conflicting declarations in
> postgres.h and port.h, and why none of these declarations follow
> ANSI C (write "(void)" not "()").

For postgres.h : that's a good question, as I thought I removed that. I
suspect it was reintroduced when reapplying the patch to my working tree
to revise it. Whoops.

As for the ansi C style - too much time with C++, though long ago now. I
think I got the PostgreSQL rules for code formatting right, but missed
the void param rule.

--
Craig Ringer

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2010-12-15 14:20:42 Re: CommitFest wrap-up
Previous Message Shigeru HANADA 2010-12-15 13:55:11 Re: SQL/MED - file_fdw