Re: Waits monitoring - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Waits monitoring
Date
Msg-id 20150910.164307.72521426.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Waits monitoring  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Waits monitoring  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

> Great - let's try to deal with [1] first, then.
> 
> Does anyone wish to object to me committing that part?

I have no objection to commiting this, too. But some fix would be
needed.

===
Generated lwlocknames.[ch] don't have header comment because
generate-lwlocknames.pl writes them into wrong place.

lmgr/Makefile looks to have some mistakes.
- lwlocknames.c is not generated from (or using) lwlocknames.c  so the entry "lwlocknames.c: lwlocknames.h" doesn't
looksto  be appropriate.
 
- maintainer-clean in lmgr/Makefile forgets to remove lwlocknames.c.

lwlock.c now includes lwlockname.c so such entry would be
needed. (But might not be needed because it is naturally
generated along with .h)

Perhaps uncommenting in pg_config_manual.h is left alone.
(This is not included in the diff below)


regards,


At Tue, 8 Sep 2015 13:01:23 -0400, Robert Haas <robertmhaas@gmail.com> wrote in
<CA+TgmoaKyg2p5ni_HeVxp-7U7AJ3B9k3rqPshmcBA6Zp1HE2iQ@mail.gmail.com>
> On Mon, Sep 7, 2015 at 7:33 AM, Ildus Kurbangaliev
> <i.kurbangaliev@postgrespro.ru> wrote:
> >> > Ildus, could you please review Amit & Robert's patch?
> >> [1] -
> >> http://www.postgresql.org/message-id/CAA4eK1KdeC1Tm5ya9gkV85Vtn4qqsRxzKJrU-tu70G_tL1xkFA@mail.gmail.com
> > About [1] and [2]. They are slightly conflicting, but if [1] is
> > going to be committed I can easily use it in [2]. And it will simplify
> > my patch, so I have no objections here. And the same time [3] can be
> > significantly simplified and improved on top of [1] and [2].
> 
> Great - let's try to deal with [1] first, then.
> 
> Does anyone wish to object to me committing that part?


========================
--- generate-lwlocknames.pl.org    2015-09-10 15:46:02.291079423 +0900
+++ generate-lwlocknames.pl    2015-09-10 15:53:22.177903045 +0900
@@ -8,5 +8,6 @@
-print
-  "/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n";
-print "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n";
+my $head_comment_c = 
+    "/* autogenerated from src/backend/storage/lmgr/lwlocknames.txt, do not edit */\n\n";
+my $head_comment_h = $head_comment_c .
+  "/* there is deliberately not an #ifndef LWLOCKNAMES_H here */\n\n";
@@ -23,2 +24,6 @@
+# Write the caution comment at the beginning of the files
+print H $head_comment_h;
+print C $head_comment_c;
+print C "static char *MainLWLockNames[] = {";

--- Makefile.org    2015-09-10 16:16:38.610660526 +0900
+++ Makefile    2015-09-10 16:39:09.718916378 +0900
@@ -26,6 +26,6 @@
-# see explanation in ../../parser/Makefile
-lwlocknames.c: lwlocknames.h ;
+lwlock.c: lwlocknames.c
-lwlocknames.h,lwlocknames.c: $(top_srcdir)/src/backend/storage/lmgr/lwlocknames.txt generate-lwlocknames.pl
+# see explanation in ../../parser/Makefile
+lwlocknames.h lwlocknames.c: $(top_srcdir)/src/backend/storage/lmgr/lwlocknames.txt generate-lwlocknames.pl    $(PERL)
$(srcdir)/generate-lwlocknames.pl$<
 
@@ -39,2 +39,2 @@maintainer-clean: clean
-    rm -f lwlocknames.h
+    rm -f lwlocknames.[ch]

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH v2] GSSAPI encryption support
Next
From: dinesh kumar
Date:
Subject: Re: [PATCH] SQL function to report log message