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 1pwk1U-0006DA-Sj for pgsql-admin@arkaria.postgresql.org; Wed, 10 May 2023 13:38:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pwk1T-00088R-QR for pgsql-admin@arkaria.postgresql.org; Wed, 10 May 2023 13:38:27 +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 1pwk1T-00088I-Fx for pgsql-admin@lists.postgresql.org; Wed, 10 May 2023 13:38:27 +0000 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pwk1R-001ZYL-02 for pgsql-admin@lists.postgresql.org; Wed, 10 May 2023 13:38:26 +0000 Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-b9e2f227640so9201108276.3 for ; Wed, 10 May 2023 06:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683725904; x=1686317904; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=xYT7Pj/wBYDq0ez2ODwUHz+5Us3pqn9mfb43F/ZtV2c=; b=INfyBqq+XTCyirJxvB41ckMlbZma5lbxbbF7VOkOjrjxWC+qPL5vovav/f2yTPO84z 3BsVOfVl9N3pnVMrsu4IDFCIjEwyLuviY7Ep6U8iKeXxgdNEGb5euHZA7czEz5aF0vgc XWcNSHgANmQt+wjTbHe0Zx8mB4aeYr3cdNdFKa87sR3z+M+c67MvW+xfdtttl1/olioS 9dJnnZ9uNycjiM1gXvzEbo1lXL/hphCNF0cmqp1HUt54c4Oy1/6ie1aCid5vcgyFp9xa QHNriIw0QTyqoYXbK7aZ+0CBou8HwxBCS/BT3NZrZkaibLXSUwJiDBjB9pGH41rpGyzE KMtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683725904; x=1686317904; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xYT7Pj/wBYDq0ez2ODwUHz+5Us3pqn9mfb43F/ZtV2c=; b=VIrsbiaaqauQ3UzJ6g/VlOnbQJoptW9sNgosuC7atGVaTgRZysU/lfn03lSCSJZKSa sN20OSsaRQOX+4JOk6k3h7VhQiwv9hoHxkWqiuUO3cmtoPy3R6C1t6Z0MuLkj+UsFFK1 gkRMQ0mvoadeagc0CFFv0q7f37Gnur0Yo6DRfmIwbIDVixZ+ByXVdoGNfHgulGAjFE0z eYc8UZI+ymPs/ZrVWbvvPg5bTqzSmnszLl6Ieo0N8OSwQVT2V07wtBR6a1PliEu+QwX4 QsK2sA4z2KzqMpfN1miQqitPpQPfwVOzQyMLBCrzPf497EqfpMn+uuGGd0znjZlvv+uc tlNQ== X-Gm-Message-State: AC+VfDwH8RBAeMSYQ2IUJlxY+39CTlyVRdqPo4N8ALvPzWdUM5JeOtq4 EkOZcPvZlm8SUo21NMtFAjiLR6eC64g= X-Google-Smtp-Source: ACHHUZ6DFaIU1LAgE2Jj16lPNnp/ZQEdl1ddOdUUraMudEMgOKCVCYtSOO4TvdaLErthaY8WckRflA== X-Received: by 2002:a25:69d1:0:b0:b9d:eed4:7999 with SMTP id e200-20020a2569d1000000b00b9deed47999mr16783595ybc.25.1683725903886; Wed, 10 May 2023 06:38:23 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:8c2c:5f08:4395:8de4? ([2600:1700:bd2c:b810:8c2c:5f08:4395:8de4]) by smtp.googlemail.com with ESMTPSA id b8-20020a253408000000b00ba2526a870esm2712728yba.43.2023.05.10.06.38.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 May 2023 06:38:23 -0700 (PDT) Message-ID: <20d47b36-b16e-28a3-3a6b-ab13d4d5b8c2@gmail.com> Date: Wed, 10 May 2023 08:38:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Question about pg_wal.tar.gz generated by pg_basebackup Content-Language: en-US To: pgsql-admin@lists.postgresql.org References: From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/10/23 03:41, Dhirendra Singh wrote: > Hi All, > I am taking backup using pg_basebackup for the purpose of point in time > recovery in case something goes wrong with the data. > The backup generates pg_wal.tar.gz which contains the wal file generated > during the backup. > Is it of any use in the point in time recovery? do i have to archive it? > According to the documentation, any wal files in pg_wal directory has to > be deleted after the base backup is restored and before the recovery starts. > So if i understand it correctly, pg_wal.tar.gz is not required for point > in time recovery...but just want to confirm if my understanding is correct. > > My sole purpose of taking the backup is for point in time recovery. I am > not going to use it to create a standby server. Use a dedicated tool instead of writing your own.  I like PgBackRest, but there are others. -- Born in Arizona, moved to Babylonia.