Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-09 Thread Nathan Bossart
On Tue, Jan 09, 2024 at 02:26:20PM +0900, Michael Paquier wrote: > On Tue, Jan 09, 2024 at 04:55:07AM +, Bertrand Drouvot wrote: >> Thanks! v6 looks good to me. > > WFM. Thanks for putting in place this sanity check when compiling. Committed. Thanks for reviewing! -- Nathan Bossart

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-08 Thread Michael Paquier
On Tue, Jan 09, 2024 at 04:55:07AM +, Bertrand Drouvot wrote: > Thanks! v6 looks good to me. WFM. Thanks for putting in place this sanity check when compiling. -- Michael signature.asc Description: PGP signature

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-08 Thread Bertrand Drouvot
Hi, On Mon, Jan 08, 2024 at 04:02:12PM -0600, Nathan Bossart wrote: > Sorry for the noise. I spent some more time tidying this up for commit, > which I am hoping to do in the next day or two. Thanks! v6 looks good to me. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-08 Thread Nathan Bossart
Sorry for the noise. I spent some more time tidying this up for commit, which I am hoping to do in the next day or two. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 4e222c1a1fc1a2476746cb7b68c1d2a203816699 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Mon, 8 Jan

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-08 Thread Nathan Bossart
On Mon, Jan 08, 2024 at 07:59:10AM +, Bertrand Drouvot wrote: > + input: [files( > +'../../backend/storage/lmgr/lwlocknames.txt', > +'../../backend/utils/activity/wait_event_names.txt')], > > I think the "[" and "]" are not needed here. D'oh! Fixed in v5. -- Nathan Bossart Amazon

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-07 Thread Bertrand Drouvot
Hi, On Sat, Jan 06, 2024 at 10:18:52AM -0600, Nathan Bossart wrote: > On Sat, Jan 06, 2024 at 09:03:52AM +, Bertrand Drouvot wrote: > > Sorry, I missed this in my first review, but instead of: > > > > - input: files('../../backend/storage/lmgr/lwlocknames.txt'), > > + input:

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-06 Thread Nathan Bossart
On Sat, Jan 06, 2024 at 09:03:52AM +, Bertrand Drouvot wrote: > Sorry, I missed this in my first review, but instead of: > > - input: files('../../backend/storage/lmgr/lwlocknames.txt'), > + input: [files('../../backend/storage/lmgr/lwlocknames.txt'), >

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-06 Thread Bertrand Drouvot
Hi, On Fri, Jan 05, 2024 at 11:46:20AM -0600, Nathan Bossart wrote: > On Fri, Jan 05, 2024 at 10:42:03AM -0600, Nathan Bossart wrote: > > On Fri, Jan 05, 2024 at 07:39:39AM +, Bertrand Drouvot wrote: > >> + die "lists of predefined LWLocks in lwlocknames.txt and > >>

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-05 Thread Nathan Bossart
On Fri, Jan 05, 2024 at 10:42:03AM -0600, Nathan Bossart wrote: > On Fri, Jan 05, 2024 at 07:39:39AM +, Bertrand Drouvot wrote: >> + die "lists of predefined LWLocks in lwlocknames.txt and >> wait_event_names.txt do not match" >> + unless $wait_event_lwlocks[$i] eq $lockname; >>

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-05 Thread Nathan Bossart
Thanks for reviewing. On Fri, Jan 05, 2024 at 07:39:39AM +, Bertrand Drouvot wrote: > Another option could be to create a sub-section for predefined LWLocks that > are > part of lwlocknames.txt and then sort both list (the one in the sub-section > and > the one in lwlocknames.txt). That

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-04 Thread Bertrand Drouvot
Hi, On Fri, Jan 05, 2024 at 12:11:44AM -0600, Nathan Bossart wrote: > On Wed, Jan 03, 2024 at 07:59:45AM +, Bertrand Drouvot wrote: > > +1 to add a test and put in a place that would produce failures at build > > time. > > I think that having the test in the script that generates the header

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-04 Thread Nathan Bossart
On Wed, Jan 03, 2024 at 11:34:25AM +0900, Michael Paquier wrote: > On Tue, Jan 02, 2024 at 11:31:20AM -0600, Nathan Bossart wrote: >> +# Find the location of lwlocknames.h. >> +my $include_dir = $node->config_data('--includedir'); >> +my $lwlocknames_file =

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-04 Thread Nathan Bossart
On Wed, Jan 03, 2024 at 07:59:45AM +, Bertrand Drouvot wrote: > +1 to add a test and put in a place that would produce failures at build time. > I think that having the test in the script that generates the header file is > more > appropriate (as building the documentation looks less usual to

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-03 Thread Bertrand Drouvot
Hi, On Tue, Jan 02, 2024 at 10:49:03PM -0500, Robert Haas wrote: > On Tue, Jan 2, 2024 at 4:45 PM Nathan Bossart > wrote: > > That seems to date back to commit 14a9101. I can agree that the suffix is > > somewhat redundant since these are already marked as type "LWLock", but > > I'll admit

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 4:45 PM Nathan Bossart wrote: > That seems to date back to commit 14a9101. I can agree that the suffix is > somewhat redundant since these are already marked as type "LWLock", but > I'll admit I've been surprised by this before, too. IMHO it makes this > proposed test

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Michael Paquier
On Tue, Jan 02, 2024 at 11:31:20AM -0600, Nathan Bossart wrote: > +# Find the location of lwlocknames.h. > +my $include_dir = $node->config_data('--includedir'); > +my $lwlocknames_file = "$include_dir/server/storage/lwlocknames.h"; I am afraid that this is incorrect because an installation could

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Nathan Bossart
On Tue, Jan 02, 2024 at 01:13:16PM -0500, Robert Haas wrote: > On Tue, Jan 2, 2024 at 12:31 PM Nathan Bossart > wrote: >> I think we're supposed to omit the "Lock" suffix in wait_event_names.txt. > > Ugh, sorry. But also, why in the world? That seems to date back to commit 14a9101. I can

Re: verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Robert Haas
On Tue, Jan 2, 2024 at 12:31 PM Nathan Bossart wrote: > I think we're supposed to omit the "Lock" suffix in wait_event_names.txt. Ugh, sorry. But also, why in the world? > > It seems like it would be good if there were an automated cross-check > > between lwlocknames.txt and

verify predefined LWLocks have entries in wait_event_names.txt

2024-01-02 Thread Nathan Bossart
(new thread) On Tue, Jan 02, 2024 at 10:34:11AM -0500, Robert Haas wrote: > On Wed, Dec 27, 2023 at 10:36 AM Nathan Bossart > wrote: >> Thanks! I also noticed that WALSummarizerLock probably needs a mention in >> wait_event_names.txt. > > Fixed. I think we're supposed to omit the "Lock"