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 1pShaB-0000XF-Ae for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 16:58:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pShaA-0004Y4-7g for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 16:58:06 +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 1pSha9-0004Xv-UG for pgsql-hackers@lists.postgresql.org; Thu, 16 Feb 2023 16:58:05 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSha7-0000Sl-Hf for pgsql-hackers@lists.postgresql.org; Thu, 16 Feb 2023 16:58:04 +0000 Received: by mail-pj1-x1036.google.com with SMTP id nh19-20020a17090b365300b00233ceae8407so2723254pjb.3 for ; Thu, 16 Feb 2023 08:58:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tTnjnAJhXGUsfqZfb7dk8i0wQ1ySULTX0C85t3++A3k=; b=mLmGFo6ps15XXEv6ynh3c8t3ouub/4Zje85zsXSLkQ2I694uQw8z2/oqHGvgolE9ib GkI0Ukn4a1tNVEkkdmvMqDoA0aGgnlGnZZTPwSH3X0WgSFpSqJKl6l4x9ntjAg62412R CTQNnZ5lGIDx2N0jRsCYCPdLh5LTzytGirD1Jj+fLSWGwNCo8poTCmkHQ8+w9Q51YIis furdpNSJQoBlcvRyym39f8IuoTsjDnhFuHjymcCOk+L9tHBGmNdKYs8h3yBVMgkpWcjA ZBGyfvj6Sm2+VvV13hwa3tIxm3PUGJNPBk58s7jajFipuA3sFB/bgo5NKIXOLd3JOtfI +Kkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tTnjnAJhXGUsfqZfb7dk8i0wQ1ySULTX0C85t3++A3k=; b=2pPl5nR4OidRLh2VZAfsXMVxW0PZUenXtg0smnbMTBgqRjSP9eWVcnrTNlXAHmz5nx X7ZcBYqe2fCB4OczSHWal3Kj3Fxg9WN44d6TKf0MkzrJ4+Yfi/TCaglAdQLwaX3tX5eu eUFPg68Fglw5TR0EC2zq3/Gy4UYFsUbCVQgRfXmql0AZ3OcKOWmjiri/B6pQ7Oom6AUA DgmwZOYp4plgVNBft81CCWJz83r++LI+hen4vMHdsZ8HNJr+v2bcnRovwWLeXAcTSs9C mTgdmQ/LXi4V+UdyoS3MzmeqXt16m4UUbrm1oOI6ot02Mc5Y9x5a7IDcL9eTJnF6XRmQ CDKA== X-Gm-Message-State: AO0yUKXn0dcBDuiQsDjouoNP+I7uTIrLnp18bR/zmqPhZsqUbeiRE+tB Z1JVRhoCa067/p9dD4JR340= X-Google-Smtp-Source: AK7set9R/N+bf7pZfuAt+8Q8y8nrBqnAGKFwubY0/2A3LEAgU+IIOCcLz0E4D6kqfnWZ3YgEFr/8ww== X-Received: by 2002:a17:902:e811:b0:19a:59d1:389e with SMTP id u17-20020a170902e81100b0019a59d1389emr2844048plg.23.1676566682529; Thu, 16 Feb 2023 08:58:02 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id r6-20020a170902be0600b00199537a7466sm1562944pls.39.2023.02.16.08.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 08:58:01 -0800 (PST) Date: Thu, 16 Feb 2023 08:57:59 -0800 From: Nathan Bossart To: Robert Haas Cc: Tom Lane , Michael Paquier , Andres Freund , Thomas Munro , Fujii Masao , Postgres hackers Subject: Re: Weird failure with latches in curculio on v15 Message-ID: <20230216165759.GA2068561@nathanxps13> References: <20230208174350.GB451849@nathanxps13> <20230208222554.GB546776@nathanxps13> <20230209002413.GA603595@nathanxps13> <3907196.1675957889@sss.pgh.pa.us> <20230209172308.GA605342@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 16, 2023 at 03:08:14PM +0530, Robert Haas wrote: > 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. I don't think it would force you to use a background worker, but if you wanted to, the tools would be available. At least, that is the intent. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com