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 1pSail-0008Jf-Hu for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 09:38:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSaik-0000hj-8I for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 09:38:30 +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 1pSaij-0000hZ-V0 for pgsql-hackers@lists.postgresql.org; Thu, 16 Feb 2023 09:38:29 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSaih-0007UP-L4 for pgsql-hackers@lists.postgresql.org; Thu, 16 Feb 2023 09:38:29 +0000 Received: by mail-lj1-x22b.google.com with SMTP id a13so1304296ljq.6 for ; Thu, 16 Feb 2023 01:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IgIbakr1+E8DZBZKQJ1lb8v9kwdCoplQ8NuPOBVe7Ss=; b=PJzocdzNlK8Ad1yT/oX9r8TBGiYXRczaAWxDp+4EQfmvkct97ajNnpFvSruL6RDQmN I0esl7343ydGLqbNqxa6amFaCios/jkoTNn7o2hW9y1sm9apJqM9hoKBsX5Pgi9Q5IkH Am6gfsa9yrD4p9zyJCeQOYtYqPqq/f+9f4enbjncZ3a1mCNhkuupZed052mmtnBnRvwQ cVVqCZzS1b66HAQ/S/c8zX6KlWrqcmUqN7Sn2ikbpm7p8cNeX2i3ngnih2ZnGDso4MfS 7nyf4Mqm70K8TqVWWvNUgQseT2ACLnWkgZ1PG53qk5CYLNSVlRG5yncMzNde/serYTXA Ttag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IgIbakr1+E8DZBZKQJ1lb8v9kwdCoplQ8NuPOBVe7Ss=; b=mcnJgoD8Ulb9cq+dalFkuypCct1z/WErbmMtuay9F6klTkLST7XzTMzkdjO1Y1hkCn mzM7KYubMUhT6cOFSqW4f/mVpgDLyjCSk3zRaz3HaojBg1BQU0hmdx8BCafdBviy+J/3 Mv/6qlpj23konvPAYbSVpTGQHw/eR5J5M4pJvVOWFXZ8TePQRtA5S4QBWSX5HKfUzcyF xr4PMyN9cFb/siAZbBL4qr3ylBi6iytrAdjz2ipePbnn7AALkPCSNrqU8FcD1rRkLOD/ 0FBZEBlZdz3k9Id57tMejT8nnKECkzvXdM5pDqAk1/FFSlN5+2nyXo7eB/rTDmYubZx/ hWTA== X-Gm-Message-State: AO0yUKWwZ3M0N560S2OPCfR0ENHGMskrtwY5jyGlzzNnNZCl0mTtlf4J pfRjVqF/UQdDcGmKfuOOco9OBLce2sbyYDj4qaE= X-Google-Smtp-Source: AK7set+s7UUdQb+N0Z2TqftkXVPoNpFzWkv8nzchPehI7AOCDpBXwT2o2L2oZOfx2b3o2QyBrDriZtINHevwinq0LiY= X-Received: by 2002:a2e:a593:0:b0:293:7477:97bd with SMTP id m19-20020a2ea593000000b00293747797bdmr728146ljp.3.1676540306826; Thu, 16 Feb 2023 01:38:26 -0800 (PST) MIME-Version: 1.0 References: <20230206004631.GA277434@nathanxps13> <20230208174350.GB451849@nathanxps13> <20230208222554.GB546776@nathanxps13> <20230209002413.GA603595@nathanxps13> <3907196.1675957889@sss.pgh.pa.us> <20230209172308.GA605342@nathanxps13> In-Reply-To: <20230209172308.GA605342@nathanxps13> From: Robert Haas Date: Thu, 16 Feb 2023 15:08:14 +0530 Message-ID: Subject: Re: Weird failure with latches in curculio on v15 To: Nathan Bossart Cc: Tom Lane , Michael Paquier , Andres Freund , Thomas Munro , Fujii Masao , Postgres hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 9, 2023 at 10:53 PM Nathan Bossart wrote: > I've been thinking about this, actually. I'm wondering if we could provide > a list of files to the archiving callback (configurable via a variable in > ArchiveModuleState), and then have the callback return a list of files that > are archived. (Or maybe we just put the list of files that need archiving > in ArchiveModuleState.) The returned list could include files that were > sent to the callback previously. The archive module would be responsible > for creating background worker(s) (if desired), dispatching files > to-be-archived to its background worker(s), and gathering the list of > archived files to return. Hmm. So in this design, the archiver doesn't really do the archiving any more, because the interface makes that impossible. It has to use a separate background worker process for that, full stop. I don't think that's a good design. It's fine if some people want to implement it that way, but it shouldn't be forced by the interface. -- Robert Haas EDB: http://www.enterprisedb.com