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 1nCOaN-0002zF-EJ for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 16:22:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nCOaM-0007Vc-9l for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Jan 2022 16:22:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCOaM-0007VT-0f for pgsql-hackers@lists.postgresql.org; Tue, 25 Jan 2022 16:22:22 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nCOaJ-0002Ty-LH for pgsql-hackers@postgresql.org; Tue, 25 Jan 2022 16:22:21 +0000 Received: by mail-pj1-x102e.google.com with SMTP id h20-20020a17090adb9400b001b518bf99ffso2404257pjv.1 for ; Tue, 25 Jan 2022 08:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=iIYWWpcqGIMwUPCU9dTpAHySW1+PVvocugxMLlPYt1k=; b=CDyPQaHuCRtH6pPsQYQ0sUuDqe8lp9zCbMcZ4RWZmIWOaVR4c8ha1yFIKEjhsHu22c ClVkPfxM1ENtqULRNiZmCssZ43NUeQ1ZvKHXHsPdnASX+CpP20d6D5h/0O4WIvVVFY+p h5hYD4aFCUZm6Xe/6CovaNZiR2Bd/sM/znKM+IW5l2pnJVXK/JRmnclWvkRljiaXokZz MjRBBIXfIiF8VEx2BfaZ7KGuV4JRmZxLODKygwsus2FoBjrd+wUzlBwXK/4MXXMLrwF2 YL6nG0/nW4p4XygtPXcqUEkffs3AZJD5QacFoNqc4uVXqo3eLsmnMdnaS47fiwdUXMTM 6EHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=iIYWWpcqGIMwUPCU9dTpAHySW1+PVvocugxMLlPYt1k=; b=63SoaiOLmzxwXtWwNaJAWsMTfrsBZWrictN8fcKMTt/B7XgnUuZXk8v4fLCYc0T+MD cM6Z3nHoNMKgB9VimNYlFOQ9mKVXieuEBtAxA5AUiGQ4FJ+Gry81JMlhwdYYkfB73K7H n46ZSDuTTDU7irk1VU/68lkGoOFAvDT29iJ5Mv7+SPio3RQq8fhdy7gedgyXiCIfVoDH 1+oV1zFjcbydO6n0U1KQZgctRRFf7gpOUEtKCJaiGqvW75E3JbjDhpXQFiGo3kaSTjB4 NIZeWrJXMOKaD4m7ONOIfWO5nP+zRisEeR7N0Q0/TmINCkCNjl/F5FI+/azrt0wwPX3E I0ow== X-Gm-Message-State: AOAM531E+wHRzy+LGPFK6aFG/gEl3oC2S+MPg9SMJJzX6ySEQe71WiFg HEHJv7RpYgE063ct+FC5aLf6qc5kv5JefgYt1W4exXN5EWCQt7MijMDAMowTz90vNWG1feNJYVh ckfHW0Qxj6nD0ryE1gMsEzJ5IRhJDCr3QnxCS4uDBZLk5v2upDcseb0JNY+IeWGV1+rR7f1G0fs 3hVDp2Nvq9GPjzjQAL6jiLY/Vss63Weya3HEiLOAvD56F5yhpP6IcGZTD87GX/MjBUXTT3/5c71 oJuwvt2Mss8RuLWT9cqZizs46faNUMWeEhjgQ== X-Google-Smtp-Source: ABdhPJzJnxv3p4Bm95MRUbOHoeR0HMaYW7gnixNSHmmnqtX/MoW58jp8Xut23ruUeVdvXT6b/HrFgw== X-Received: by 2002:a17:903:18d:b0:14b:fa3:ad7d with SMTP id z13-20020a170903018d00b0014b0fa3ad7dmr19659677plg.48.1643127737817; Tue, 25 Jan 2022 08:22:17 -0800 (PST) Received: from localhost.localdomain ([45.113.251.168]) by smtp.gmail.com with ESMTPSA id b13sm20089659pfm.27.2022.01.25.08.22.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Jan 2022 08:22:17 -0800 (PST) Subject: Re: refactoring basebackup.c To: Robert Haas , Dipesh Pandit , Michael Paquier Cc: Jeevan Ladhe , Dmitry Dolgov <9erthalion6@gmail.com>, Mark Dilger , "pgsql-hackers@postgresql.org" References: <20211115162641.dmo6l32fklh64gnw@localhost> From: tushar Message-ID: Date: Tue, 25 Jan 2022 21:52:12 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/22/22 12:03 AM, Robert Haas wrote: > I committed the base backup target patch yesterday, and today I > updated the remaining code in light of Michael Paquier's commit > 5c649fe153367cdab278738ee4aebbfd158e0546. Here is the resulting patch. Thanks Robert,  I tested against the latest PG Head and found a few issues - A)Getting syntax error if -z is used along with -t [edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/data902 -z -Xfetch pg_basebackup: error: could not initiate base backup: ERROR:  syntax error OR [edb@centos7tushar bin]$ ./pg_basebackup -t server:/tmp/t2 --compress=server-gzip:9 -Xfetch -v -z pg_basebackup: initiating base backup, waiting for checkpoint to complete pg_basebackup: error: could not initiate base backup: ERROR:  syntax error B)No information of "client-gzip" or "server-gzip" added under "--compress" option/method of ./pg_basebackup --help. C) -R option is silently ignoring [edb@centos7tushar bin]$  ./pg_basebackup  -Z 4  -v  -t server:/tmp/pp -Xfetch -R pg_basebackup: initiating base backup, waiting for checkpoint to complete pg_basebackup: checkpoint completed pg_basebackup: write-ahead log start point: 0/30000028 on timeline 1 pg_basebackup: write-ahead log end point: 0/30000100 pg_basebackup: base backup completed [edb@centos7tushar bin]$ go to /tmp/pp folder and extract it - there is no "standby.signal" file and if we start cluster against this data directory,it will not be in slave mode. if this is not supported then I think we should throw some errors. -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company