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 1mQAOD-0006T5-MB for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Sep 2021 15:30:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mQAOC-0001yT-JD for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Sep 2021 15:30:28 +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 1mQAOC-0001yL-B4 for pgsql-hackers@lists.postgresql.org; Tue, 14 Sep 2021 15:30:28 +0000 Received: from forward500p.mail.yandex.net ([77.88.28.110]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQAO9-0004xh-Ny for pgsql-hackers@postgresql.org; Tue, 14 Sep 2021 15:30:27 +0000 Received: from sas1-c5430127e222.qloud-c.yandex.net (sas1-c5430127e222.qloud-c.yandex.net [IPv6:2a02:6b8:c14:3d1d:0:640:c543:127]) by forward500p.mail.yandex.net (Yandex) with ESMTP id 1B363F01D11; Tue, 14 Sep 2021 18:30:23 +0300 (MSK) Received: from 2a02:6b8:c14:39a5:0:640:229a:7e5e (2a02:6b8:c14:39a5:0:640:229a:7e5e [2a02:6b8:c14:39a5:0:640:229a:7e5e]) by sas1-c5430127e222.qloud-c.yandex.net (mxback/Yandex) with HTTP id KUY2790DsuQ1-UMDCNaBZ; Tue, 14 Sep 2021 18:30:22 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1631633422; bh=1FXVtFrnB7Wi1Wl7dmB6CfNvLKh3EwGxe8cQoq8ZJXA=; h=References:Date:Message-Id:Cc:Subject:In-Reply-To:To:From; b=H2O3773jQhM9cBxhpw5VOL6Nrh5viva7oWJJwn38dRAnRvxEzZTnb+zoN4NmzqylK QQM9CPoP/prvd1E/HkowvcjjHujar34a6Sf8GRXxbhsENI99qCpHnh8b7vO9JK/ngF erD6jSIYV3vUQGh9HPcd38v1+jbl7zNW7BoMy2Qk= Authentication-Results: sas1-c5430127e222.qloud-c.yandex.net; dkim=pass header.i=@zsrv.org Received: by sas1-229a7e5e75ed.qloud-c.yandex.net with HTTP; Tue, 14 Sep 2021 18:30:22 +0300 From: Sergei Kornilov To: Robert Haas , Dilip Kumar Cc: Jeevan Ladhe , Mark Dilger , "pgsql-hackers@postgresql.org" , tushar In-Reply-To: References: <58D2BD01-B541-4032-9C0B-B6143841E7ED@enterprisedb.com> Subject: Re: refactoring basebackup.c MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 14 Sep 2021 18:30:22 +0300 Message-Id: <979131631633278@mail.yandex.ru> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello I found that in 0001 you propose to rename few options. Probably we could rename another option for clarify? I think FAST (it's about some bw limits?) and WAIT (wait for what? checkpoint?) option names are confusing. Could we replace FAST with "CHECKPOINT [fast|spread]" and WAIT to WAIT_WAL_ARCHIVED? I think such names would be more descriptive. - if (PQserverVersion(conn) >= 100000) - /* pg_recvlogical doesn't use an exported snapshot, so suppress */ - appendPQExpBufferStr(query, " NOEXPORT_SNAPSHOT"); + /* pg_recvlogical doesn't use an exported snapshot, so suppress */ + if (use_new_option_syntax) + AppendStringCommandOption(query, use_new_option_syntax, + "SNAPSHOT", "nothing"); + else + AppendPlainCommandOption(query, use_new_option_syntax, + "NOEXPORT_SNAPSHOT"); In 0002, it looks like condition for 9.x releases was lost? Also my gcc version 8.3.0 is not happy with v5-0007-Support-base-backup-targets.patch and produces: basebackup.c: In function ‘parse_basebackup_options’: basebackup.c:970:7: error: ‘target_str’ may be used uninitialized in this function [-Werror=maybe-uninitialized] errmsg("target '%s' does not accept a target detail", ^~~~~~ regards, Sergei