Re: BUG #19095: Test if function exit() is used fail when linked static - Mailing list pgsql-bugs

From VASUKI M
Subject Re: BUG #19095: Test if function exit() is used fail when linked static
Date
Msg-id CACTYHzg=W-D06q2c8jdNi7r9EA+urDVi0zoGTyrY3Q3eA_9P-A@mail.gmail.com
Whole thread
In response to Re: BUG #19095: Test if function exit() is used fail when linked static  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Responses Re: BUG #19095: Test if function exit() is used fail when linked static
List pgsql-bugs
Hi Nazir,

Thank you for pointing this out, and thanks to Andres for the clarification in the referenced thread.

You are absolutely right — with a stamp file, we need to ensure that its timestamp is updated unconditionally so that it remains newer than the inputs. Keeping the existence check (if (! -f ...)) would indeed leave the stamp file older than the rebuilt library, which can trigger unnecessary rebuilds in Makefile-based builds.

Although Ninja avoids repeated rebuilds due to its internal tracking, Make relies purely on timestamps, so the safer and correct behavior is to always recreate (touch) the stamp file.

The updated implementation without the existence check is therefore the correct approach.

Regards,
Vasuki M
C-DAC,chennai

pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: BUG #19412: Wrong query result with not null constraint
Next
From: Michael Paquier
Date:
Subject: Re: BUG #19095: Test if function exit() is used fail when linked static