From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com> |
Subject: | Re: Why do we have perl and sed versions of Gen_dummy_probes? |
Date: | 2021-05-07 15:19:02 |
Message-ID: | d663ef09-1a71-6de0-aebd-9090cee1a934@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 5/6/21 9:55 AM, Andrew Dunstan wrote:
> On 5/6/21 12:59 AM, Andres Freund wrote:
>> Hi,
>>
>> On 2021-05-06 00:18:12 -0400, Tom Lane wrote:
>>> Andres Freund <andres(at)anarazel(dot)de> writes:
>>>> I understand why we don't want to rely on sed because of windows - but
>>>> it's far from obvious why we can't just use the .pl variant all the
>>>> time?
>>> Perl is not considered a hard build requirement on non-Windows.
>> Oops, forgot that.
>>
>>
>>> We could dodge that by shipping a pre-built dummy probes.h,
>>> but that doesn't really seem like a cleaner way than what's
>>> there now.
>> I tried to regenerate Gen_dummy_probes.pl using s2p - which doesn't seem
>> to exist for modern versions of perl anymore :(
>>
>>
>>> Also, as I read it, Gen_dummy_probes.sed is useful in any case as
>>> being the "source code" for Gen_dummy_probes.pl. You'd need some
>>> other form of documentation if you removed it.
>
> I suggest we add a README that sets out
>
>
> a) why we do things this way
>
> b) that the sed script is what's authoritative
>
> c) how to regenerate the perl script if you change the sed script,
> including where to get s2p
>
>
> I can do that.
>
>
Here's a patch that adds the README and also adds a Makefile recipe for
regenerating Gen_dummy_probes.pl after the sed script is changed. On my
system at least the recipe is idempotent.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
0001-Add-a-README-and-Makefile-recipe-for-Gen_dummy_probe.patch | text/x-patch | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2021-05-07 15:19:10 | Re: cache lookup failed for statistics object 123 |
Previous Message | Andrew Dunstan | 2021-05-07 15:15:11 | Re: Copyright on perl files |