Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxLSl-0001Ci-0i for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2021 02:55:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kxLSi-00045Q-Vf for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Jan 2021 02:55:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxLSi-00045I-Oq for pgsql-hackers@lists.postgresql.org; Thu, 07 Jan 2021 02:55:44 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxLSc-0001tJ-Hb for pgsql-hackers@lists.postgresql.org; Thu, 07 Jan 2021 02:55:44 +0000 Received: from hnk.local (p2390043-ipbf1028funabasi.chiba.ocn.ne.jp [118.7.248.43]) by oss.nttdata.com (Postfix) with ESMTPSA id 122A3625C3; Thu, 7 Jan 2021 11:55:34 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: A failure of standby to follow timeline switch To: Kyotaro Horiguchi Cc: pgsql-hackers@lists.postgresql.org References: <20210104.120610.767727791822348683.horikyota.ntt@gmail.com> <20210105.172602.1507192651696938626.horikyota.ntt@gmail.com> From: Fujii Masao Message-ID: Date: Thu, 7 Jan 2021 11:55:33 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20210105.172602.1507192651696938626.horikyota.ntt@gmail.com> 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 2021/01/05 17:26, Kyotaro Horiguchi wrote: > At Mon, 4 Jan 2021 19:00:21 +0900, Fujii Masao wrote in >> >> >> On 2021/01/04 12:06, Kyotaro Horiguchi wrote: >>> At Sat, 26 Dec 2020 02:15:06 +0900, Fujii Masao >>> wrote in >>>> >>>> On 2020/12/25 12:03, Kyotaro Horiguchi wrote: >>> The attached is the fixed version. >> >> Thanks for updating the patches! >> >>> In the first patch, the test added to 001_stream_rep.pl involves two >>> copied functions related to server-log investigation from >>> 019_repslot_limit.pl. >> >> So you're planning to define them commonly in TestLib.pm or elsewhere? > > Yeah.. That's correct. Newly added as the first patch. > > While making that change, I extended the interface of slurp_file to > allow reading from arbitrary position. Is this extension really helpful for current use case? At least I'd like to avoid back-patching this since it's an exntesion... OsFHandleOpen(my $fh = IO::Handle->new(), $fHandle, 'r') or croak "could not read \"$filename\": $^E\n"; + seek($fh, $from, 0) + or croak "could not seek \"$filename\" to $from: $^E\n"; I'm not familiar with this area, but SetFilePointer() is more suitable rather than seek()? > Thanks. The attached is the revised patchset. Thanks! Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION