Re: shared-memory based stats collector

From: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: alvherre(at)2ndquadrant(dot)com, andres(at)anarazel(dot)de, tomas(dot)vondra(at)2ndquadrant(dot)com, 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: 2019-02-25 11:27:13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 25.02.2019 07:52, Kyotaro HORIGUCHI wrote:
> It is fixed by moving StartTransactionCommand to before the first
> pgstat_f_s_dbentry(), which looks better not having this problem.

Thank you. Still there are couple TAP-test which don't pass: and I think the next simple patch
solves the issue:

diff --git a/src/backend/postmaster/pgstat.c
index f9b22a4d71..d500f9d090 100644
--- a/src/backend/postmaster/pgstat.c
+++ b/src/backend/postmaster/pgstat.c
@@ -3169,6 +3169,9 @@ pgstat_bestart(void)
case StartupProcess:
beentry->st_backendType = B_STARTUP;
+ case ArchiverProcess:
+ beentry->st_backendType = B_ARCHIVER;
+ break;
case BgWriterProcess:
beentry->st_backendType = B_BG_WRITER;
diff --git a/src/bin/pg_basebackup/t/
index 8939758c59..4f656c98a3 100644
--- a/src/bin/pg_basebackup/t/
+++ b/src/bin/pg_basebackup/t/
@@ -6,7 +6,7 @@ use File::Basename qw(basename dirname);
use File::Path qw(rmtree);
use PostgresNode;
use TestLib;
-use Test::More tests => 106;
+use Test::More tests => 105;

program_version_ok('pg_basebackup'); has 105 tests now because pg_stat_tmp dir was
removed from the `foreach my $dirname` loop.

Arthur Zakirov
Postgres Professional:
Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-02-25 11:29:21 Re: psql show URL with help
Previous Message Peter Eisentraut 2019-02-25 11:06:32 Re: psql show URL with help