Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyEPo-0003TA-EV for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Feb 2019 11:27:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gyEPm-0006c2-By for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Feb 2019 11:27:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyEPl-0006bv-Vd for pgsql-hackers@lists.postgresql.org; Mon, 25 Feb 2019 11:27:18 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gyEPj-0002XM-D0 for pgsql-hackers@postgresql.org; Mon, 25 Feb 2019 11:27:17 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id B12FA21C69F0; Mon, 25 Feb 2019 14:27:13 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.27.237] (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 59F3A21C69A0; Mon, 25 Feb 2019 14:27:13 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1551094033; bh=7jg0xfB4WWiEPviEMCoDdgIQjCUob2aNyoLHQTfGJA0=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=nPURYtW1YBiC3HV8zZHqXmYlHeXyY2lvS7ddeEf39FSSpc31jphMLEo6kH/W6+gmu TQiKgBub2BUKRjIF71QSkKKyeyYq1DomTtYbRhpEKEK5m3pU84WJyUZrvqeIHOMGG6 D31hsM0EEN/V442rXjr8ydU7uBj0Smo8HRisevSk= Subject: Re: shared-memory based stats collector To: Kyotaro HORIGUCHI Cc: alvherre@2ndquadrant.com, andres@anarazel.de, tomas.vondra@2ndquadrant.com, ah@cybertec.at, magnus@hagander.net, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org References: <20190221.160555.191280262.horiguchi.kyotaro@lab.ntt.co.jp> <20190222.171956.98584931.horiguchi.kyotaro@lab.ntt.co.jp> <20190225.135214.163727209.horiguchi.kyotaro@lab.ntt.co.jp> From: Arthur Zakirov Message-ID: Date: Mon, 25 Feb 2019 14:27:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190225.135214.163727209.horiguchi.kyotaro@lab.ntt.co.jp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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