pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arthur Zakirov <a.zakirov@postgrespro.ru>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: alvherre@2ndquadrant.com
Cc: andres@anarazel.de
Cc: tomas.vondra@2ndquadrant.com
Cc: ah@cybertec.at
Cc: magnus@hagander.net
Cc: robertmhaas@gmail.com
Cc: tgl@sss.pgh.pa.us
Cc: pgsql-hackers@postgresql.org
Subject: Re: shared-memory based stats collector
Date: Mon, 25 Feb 2019 14:27:13 +0300
Message-ID: <fb4ca586-c3f0-7c2f-ca2e-2aa49b66d146@postgrespro.ru> (raw)
In-Reply-To: <20190225.135214.163727209.horiguchi.kyotaro@lab.ntt.co.jp>
References: <20190221.160555.191280262.horiguchi.kyotaro@lab.ntt.co.jp>
	<db346d14-4130-57a5-5f46-9a57e9982bec@postgrespro.ru>
	<20190222.171956.98584931.horiguchi.kyotaro@lab.ntt.co.jp>
	<20190225.135214.163727209.horiguchi.kyotaro@lab.ntt.co.jp>

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: 
002_archiving.pl and 010_pg_basebackup.pl. I think the next simple patch 
solves the issue:


diff --git a/src/backend/postmaster/pgstat.c 
b/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;
                 break;
+           case ArchiverProcess:
+               beentry->st_backendType = B_ARCHIVER;
+               break;
             case BgWriterProcess:
                 beentry->st_backendType = B_BG_WRITER;
                 break;
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl 
b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 8939758c59..4f656c98a3 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -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_help_ok('pg_basebackup');
  program_version_ok('pg_basebackup');


010_pg_basebackup.pl has 105 tests now because pg_stat_tmp dir was 
removed from the `foreach my $dirname` loop.

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company




view thread (238+ messages)  latest in thread

Message-ID: <fb4ca586-c3f0-7c2f-ca2e-2aa49b66d146@postgrespro.ru>
Permalink:  ../fb4ca586-c3f0-7c2f-ca2e-2aa49b66d146@postgrespro.ru/
Also on:    postgresql.org/message-id/fb4ca586-c3f0-7c2f-ca2e-2aa49b66d146@postgrespro.ru

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.zakirov@postgrespro.ru, horiguchi.kyotaro@lab.ntt.co.jp, alvherre@2ndquadrant.com, andres@anarazel.de, tomas.vondra@2ndquadrant.com, ah@cybertec.at, magnus@hagander.net, robertmhaas@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: shared-memory based stats collector
  In-Reply-To: <fb4ca586-c3f0-7c2f-ca2e-2aa49b66d146@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox