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 1lrrYs-0005S8-7P for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Jun 2021 00:31:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrrYr-0007HW-2v for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Jun 2021 00:31:41 +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 1lrrYq-0007HO-Sv for pgsql-bugs@lists.postgresql.org; Sat, 12 Jun 2021 00:31:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrrYk-0003rW-H2 for pgsql-bugs@lists.postgresql.org; Sat, 12 Jun 2021 00:31:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15C0VU9S2136547; Fri, 11 Jun 2021 20:31:30 -0400 From: Tom Lane To: Michael Paquier cc: Amit Langote , sbernikov@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #17055: Logical replication worker crashes when applying update of row that dose not exist in target partiti In-reply-to: References: <17055-9ba800ec8522668b@postgresql.org> <1828113.1623370641@sss.pgh.pa.us> <1881335.1623423667@sss.pgh.pa.us> <2058966.1623442520@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Sat, 12 Jun 2021 09:21:47 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2136545.1623457890.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 11 Jun 2021 20:31:30 -0400 Message-ID: <2136546.1623457890@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > +$node_subscriber->append_conf('postgresql.conf', "log_min_messages =3D = debug1"); > +$node_subscriber->reload; > Wouldn't it be better to make sure that the change is effective before > moving on to the end of the test? AFAICS, none of the other callers of sub reload are doing anything special to wait for it to take effect. Not sure why this one would need more protection. If we do need a fix for that, likely sub reload itself had better do it. > +my $logfile =3D slurp_file($node_subscriber->logfile()); > +ok( $logfile =3D~ > + qr/logical replication did not find row to be updated in replicati= on target relation "tab_full_pk"/, > + 'update target row is missing'); > I think that it would be better here to grab the log location before > running the queries that will be matched with the logs, then pass down > the location to slurp_file(). This coding is also stolen verbatim from other test scripts. What is your concern about it exactly? It's not like the tests have such varying amounts of log output that an unexpected log rotation would be likely. (Does the default TAP setup even allow log rotation at all? I doubt it.) regards, tom lane