Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name
Date
Msg-id 20230630213956.GA2941194@nathanxps13
Whole thread Raw
In response to Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name
List pgsql-hackers
On Wed, Apr 26, 2023 at 03:07:18PM +0300, Aleksander Alekseev wrote:
> The commit message may require a bit of tweaking by the committer but
> other than that the patch seems to be fine. I'm going to mark it as
> RfC in a bit unless anyone objects.

In v4, I've introduced a new BGW_LIBLEN macro and set it to the default
value of MAXPGPATH (1024).  This way, the value can live in bgworker.h like
the other BGW_* macros do.  Plus, this should make the assertion that
checks for backward compatibility unnecessary.  Since bgw_library_name is
essentially a path, I can see the argument that we should just set
BGW_LIBLEN to MAXPGPATH directly.  I'm curious what folks think about this.

I also changed the added sizeofs to use the macro for consistency with the
surrounding code.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PG 16 draft release notes ready
Next
From: Tom Lane
Date:
Subject: Re: Should we remove db_user_namespace?