Re: Waits monitoring

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: robertmhaas(at)gmail(dot)com
Cc: i(dot)kurbangaliev(at)postgrespro(dot)ru, amit(dot)kapila16(at)gmail(dot)com, andres(at)anarazel(dot)de, simon(at)2ndquadrant(dot)com, a(dot)korotkov(at)postgrespro(dot)ru, masao(dot)fujii(at)gmail(dot)com, kommi(dot)haribabu(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Waits monitoring
Date: 2015-09-10 07:43:07
Message-ID: 20150910.164307.72521426.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 looks to
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(at)gmail(dot)com> wrote in <CA+TgmoaKyg2p5ni_HeVxp-7U7AJ3B9k3rqPshmcBA6Zp1HE2iQ(at)mail(dot)gmail(dot)com>
> On Mon, Sep 7, 2015 at 7:33 AM, Ildus Kurbangaliev
> <i(dot)kurbangaliev(at)postgrespro(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message dinesh kumar 2015-09-10 08:56:33 Re: [PATCH] SQL function to report log message
Previous Message Michael Paquier 2015-09-10 07:27:53 Re: [PATCH v2] GSSAPI encryption support