From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | alvherre(at)2ndquadrant(dot)com |
Cc: | andres(at)anarazel(dot)de, michael(at)paquier(dot)xyz, thomas(dot)munro(at)gmail(dot)com, tomas(dot)vondra(at)2ndquadrant(dot)com, a(dot)zakirov(at)postgrespro(dot)ru, ah(at)cybertec(dot)at, magnus(at)hagander(dot)net, robertmhaas(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: shared-memory based stats collector |
Date: | 2020-03-30 00:29:45 |
Message-ID: | 20200330.092945.1926516177888515081.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thank you for looking this.
At Fri, 27 Mar 2020 12:34:02 -0300, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote in
> On 2020-Mar-27, Kyotaro Horiguchi wrote:
>
> > +/*
> > + * XLogArchiveWakeupEnd - Set up archiver wakeup stuff
> > + */
> > +void
> > +XLogArchiveWakeupStart(void)
> > +{
> > + Latch *old_latch PG_USED_FOR_ASSERTS_ONLY;
> > +
> > + SpinLockAcquire(&XLogCtl->info_lck);
> > + old_latch = XLogCtl->archiverWakeupLatch;
> > + XLogCtl->archiverWakeupLatch = MyLatch;
> > + SpinLockRelease(&XLogCtl->info_lck);
> > + Assert (old_latch == NULL);
> > +}
>
> Comment is wrong about the function name; OTOH I don't think the
Oops! I found a similar mistake in another place. (pgstat_flush_funcentry)
> old_latch assigment in the fourth line won't work well in non-assert
> builds. But why do you need those shenanigans? Surely
> "Assert(XLogCtl->archiverWakeupLatch == NULL)" in the locked region
> before assigning MyLatch should be sufficient and acceptable?
Right. Maybe I wanted to move the assertion out of the lock section,
but that's actually useless.
Fixed them and rebased.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v28-0001-Use-standard-crash-handler-in-archiver.patch | text/x-patch | 1.7 KB |
v28-0002-sequential-scan-for-dshash.patch | text/x-patch | 8.3 KB |
v28-0003-Add-conditional-lock-feature-to-dshash.patch | text/x-patch | 6.1 KB |
v28-0004-Make-archiver-process-an-auxiliary-process.patch | text/x-patch | 16.8 KB |
v28-0005-Shared-memory-based-stats-collector.patch | text/x-patch | 228.9 KB |
v28-0006-Doc-part-of-shared-memory-based-stats-collector.patch | text/x-patch | 21.5 KB |
v28-0007-Remove-the-GUC-stats_temp_directory.patch | text/x-patch | 9.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-03-30 00:33:51 | Re: backup manifests |
Previous Message | Tom Lane | 2020-03-30 00:25:32 | Re: snapper vs. HEAD |