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 1gRG3n-00008N-6K for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 12:32:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRG3l-0005jI-Ls for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2018 12:32:17 +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 1gRG3l-0005jB-AX for pgsql-hackers@lists.postgresql.org; Mon, 26 Nov 2018 12:32:17 +0000 Received: from forward501p.mail.yandex.net ([2a02:6b8:0:1472:2741:0:8b7:120]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRG3i-0007Gb-7L for pgsql-hackers@postgresql.org; Mon, 26 Nov 2018 12:32:16 +0000 Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward501p.mail.yandex.net (Yandex) with ESMTP id 612F73500507; Mon, 26 Nov 2018 15:32:11 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 2SbUQns04M-WAF0teuL; Mon, 26 Nov 2018 15:32:10 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1543235530; bh=wwI6qdG0xYgAlITSL3mm1UfmvsyRlU53tiefrUv0z7A=; h=From:To:Cc:In-Reply-To:References:Subject:Date:Message-Id; b=eAxQIBebkD0YVYVJThIoceAspwuzzNm5Dke2ffGuiMeLfKqVl/rrARz6Q78Ucr9FG MYFNj//fSgaS5LukGiET2d2Na0t0zZ7b6isXqe8NkZh0Hk9KrYJsB05ukDxPE114nR X95mQrv3+xNgqIeUhOJkI6K6FxIwz+FlEFhIb20I= Authentication-Results: mxback9g.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by iva2-6ec8f0a6115e.qloud-c.yandex.net with HTTP; Mon, 26 Nov 2018 15:32:10 +0300 From: Sergei Kornilov To: Michael Paquier , Peter Eisentraut Cc: Postgres hackers In-Reply-To: <20181126002849.GD1776@paquier.xyz> References: <20181126002849.GD1776@paquier.xyz> Subject: Re: pgsql: Integrate recovery.conf into postgresql.conf MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Mon, 26 Nov 2018 15:32:10 +0300 Message-Id: <27802171543235530@iva2-6ec8f0a6115e.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi > The buildfarm is unhappy after this one: > https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=culicidae&br=HEAD > > If I use -DEXEC_BACKEND when compiling the tests complain about a > timeout in 003_recovery_targets. Here is what the buildfarm reports, I > can see the failure by myself as well: > # Postmaster PID for node "standby_6" is 26668 > # poll_query_until timed out executing this query: > # SELECT '0/3022690'::pg_lsn <= pg_last_wal_replay_lsn() > # expecting this output: > # t > # last actual query output: > # f > # with stderr: > Timed out while waiting for standby to catch up at > t/003_recovery_targets.pl line 34. I can reproduce this and notice wrong assign settings order. For example standby_6 has > recovery_target_name = '$recovery_name' > recovery_target_xid = '$recovery_txid' > recovery_target_time = '$recovery_time' But recoveryTarget was set to RECOVERY_TARGET_XID Without -DEXEC_BACKEND all fine. As far as I understand the guc.c code with EXEC_BACKEND all processes uses different config processing logic. We serialize all GUC and restore at process start. And we sort GUC by name in build_guc_variables - so we restore settings in wrong order. I was afraid that the GUC system does not guarantee the order of settings... What is preferable solution? Seems we can not simple change this logic. I think i can reorganize all new recovery_target_* GUC into single one with format, for example, recovery_target = "xid:607" (was mentioned in patch discussion). regards, Sergei