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 1jkp1W-0003nc-76 for pgsql-general@arkaria.postgresql.org; Mon, 15 Jun 2020 13:19:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jkp1V-0007C1-2y for pgsql-general@arkaria.postgresql.org; Mon, 15 Jun 2020 13:19:37 +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 1jkp1U-0007Bu-Mt for pgsql-general@lists.postgresql.org; Mon, 15 Jun 2020 13:19:36 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jkp1Q-0002Sj-Hq for pgsql-general@lists.postgresql.org; Mon, 15 Jun 2020 13:19:35 +0000 Received: by mail-ed1-x541.google.com with SMTP id c35so11500363edf.5 for ; Mon, 15 Jun 2020 06:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=tI2VqoV36Ka62M4vmE3Ht/2JlWQ79YDGIIyxNnkBH3s=; b=z42pHjI2PpLe2ow4Tr3dOvTDm66qXi/A1XTrPYIU2uRJzS7A5/nSEl0NTjOuxh1T+O huzFRD5ymfT+I9RMqha1hKuY+dIWqaIoGNbTRMH+Sph7ehAwYFOSLf2+s23lwIQZvt3Y jYRhf6zJipetuyyC1ukF1G4/A8p71VaRyaQOCbYADiWeN6kWbMJr07h+jiNGhVL7TdvF gXwROlkJCVdl/jE5O3FhDGJgYih6gPEym4bGjh/UBpiNVzrfc1TyWvz5rplPrGWpjf/P EUtFxp4dAs7ZbKDPPYQGlPrc1Jwn1wbycyTjxReof9Z69ooRDdo13QHW61IVlURxf7Qe +hNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=tI2VqoV36Ka62M4vmE3Ht/2JlWQ79YDGIIyxNnkBH3s=; b=ojNMPXlx9Dl6ZJDaHheB1NYQ+kDfBphbKBx3zR9aY0fDKbiEi8JegZQ9hh2Bi7LXWp lEJHfEa7xaeAwC5Cw8owYosuJ+J6bwdFHtM30N9Q79sLIyYHw/xWU4blDG1Ze+uykFK/ JTUqmKkgo5JJ+pZdmrAzVzNlG5bSgishtLbGA30ZjseQTfPe8/8pMXYv4AuA9aqnuL7p a9zzqDd9cqeuGfFx07bW40MX14/7ycC04sbO3TdsnHB77hKbn1jPH70KLt4pErbL54pm HEi36xKczDGJDh1VrYAWRWjrJCt/0wLzR9HEAv4uS3nCZzekHVBvZCfeZlbD6j0hELyY BIEw== X-Gm-Message-State: AOAM531GiDO9BIOLYGf3ANo2GNAdchb1J2f1Ftsw96Pt6EQAcbBH13TV xKCk0AV3uMN/5oBK0Szsh/W4fg== X-Google-Smtp-Source: ABdhPJy/l8V/bdKLKciqvqYm19zHdii8Cwa7jNIb6NG2yIXjUIgVkIDc5iXAPAwX5mnDh/qh1882HA== X-Received: by 2002:a05:6402:1767:: with SMTP id da7mr24386918edb.90.1592227170981; Mon, 15 Jun 2020 06:19:30 -0700 (PDT) Received: from localhost.localdomain (217-149-168-120.nat.highway.telekom.at. [217.149.168.120]) by smtp.gmail.com with ESMTPSA id q5sm8443640edr.21.2020.06.15.06.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 06:19:30 -0700 (PDT) Message-ID: Subject: Re: Something else about Redo Logs disappearing From: Laurenz Albe To: Peter Cc: Magnus Hagander , Stephen Frost , Adrian Klaver , pgsql-general Date: Mon, 15 Jun 2020 15:19:29 +0200 In-Reply-To: <20200615125022.GA21249@gate.oper.dinoex.org> References: <20200609194248.GL6680@tamriel.snowman.net> <20200610074608.GA29949@gate.oper.dinoex.org> <20200610123222.GV6680@tamriel.snowman.net> <20200611173032.GA93488@gate.oper.dinoex.org> <20200613032453.GA8494@gate.oper.dinoex.org> <20200613174816.GA842@gate.oper.dinoex.org> <20200615125022.GA21249@gate.oper.dinoex.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2020-06-15 at 14:50 +0200, Peter wrote: > ! An example: > ! > ! - Backup #1 calls "pgpre.sh" > ! - Backup #1 starts copying files > ! - Backup #2 calls "pgpre.sh". > ! This will cancel the first backup. > ! - Backup #1 completes copying files. > ! - Backup #1 calls "pgpost.sh". > ! It will receive an error. > ! So it has to invalidate the backup. > ! - Backup #2 completes copying files. > ! - Backup #2 calls "pgpost.sh". > ! It gets a "backup_label" file and completes the backup. > > That's not true. Ah, yes, you are right. It's a while since I wrote these scripts. Since "pgpre.sh" and "pgpost.sh" are independent, there is no way to tell which of them belongs to which other. So calling "pgpost.sh" indeed ends the most recently started backup and returns "backup_label" accordingly. That means: the caller of the scripts has to make sure not to start a second backup while the first one is running. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com