Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fW4b6-0000RJ-SL for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jun 2018 18:46: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 1fW4b5-0000il-04 for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jun 2018 18:46:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fW4b4-0000ie-Ir for pgsql-hackers@lists.postgresql.org; Thu, 21 Jun 2018 18:46:18 +0000 Received: from forward105o.mail.yandex.net ([2a02:6b8:0:1a2d::608]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fW4b0-0006zq-DL for pgsql-hackers@postgresql.org; Thu, 21 Jun 2018 18:46:17 +0000 Received: from mxback11j.mail.yandex.net (mxback11j.mail.yandex.net [IPv6:2a02:6b8:0:1619::84]) by forward105o.mail.yandex.net (Yandex) with ESMTP id BF63B4446008 for ; Thu, 21 Jun 2018 21:46:08 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback11j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id uyy86bpRME-k7cuU9N1; Thu, 21 Jun 2018 21:46:07 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1529606767; bh=SrT3Z+gSo4MLTWGB/QP0BtsjWeF54rFKZp4W4ViLbew=; h=From:To:Subject:Date:Message-Id; b=PNDgfIVgT76kfHLX796uCZmT3xnJfL9u41Tt65ZpG8hBce/32+jdkeo8PCh2TjfbB NJO65ChNtfmCnibGI/uQxIbBNcZgYiUVSppK4meuZe+RfT7G4uv+ksnprcJOrLT+5L Ihar3N438ue0Bz3akHv7RfJxk7ZOEBzuMwyMLJo4= Authentication-Results: mxback11j.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web3g.yandex.ru with HTTP; Thu, 21 Jun 2018 21:46:07 +0300 From: Sergei Kornilov To: PostgreSQL mailing lists Subject: Continue work on changes to recovery.conf API MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 21 Jun 2018 21:46:07 +0300 Message-Id: <607741529606767@web3g.yandex.ru> Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello all I would like to continue work on new recovery api proposed in thread [1]. We have some form of consensus but thread has been inactive for a long time and i hope i can help. I start from last published patch [2] and make some changes: - updated to current HEAD - made the patch pass make check-world run - removed recovery.auto.conf lookup and changed pg_basebackup to append recovery parameters to postgresql.auto.conf in both plain and tar formats - revert back trigger_file logic, but rename to promote_signal_file. I think here is no reason to make GUC only for directory path with hardcoded file name as was discussed in original thread. Any feedback is strongly appreciated. Thank you A brief summary of proposed changes: - if recovery.conf present during start we report FATAL error about old style config - recovery mode start if exists file "recovery.signal" in datadir, all old recovery_target_* options are replaced by recovery_target_type and recovery_target_value GUC - start standby mode - by file "standby.signal" - if present both - standby wins - pg_basebackup -R will append primary_conninfo and primary_slot_name to postgresql.auto.conf config - all new GUC are still PGC_POSTMASTER PS: i will add an entry to 2018-09 CommitFest when it is become available. regards, Sergei [1] https://www.postgresql.org/message-id/flat/CANP8%2BjLO5fmfudbB1b1iw3pTdOK1HBM%3DxMTaRfOa5zpDVcqzew%40mail.gmail.com [2] https://www.postgresql.org/message-id/CANP8+jJo-LO4xtS7G=iN7PG5o60WeWdKEAn+X+Gnf+RNay5jGQ@mail.gmail.com