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 1pMaOE-0003Tk-Oa for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jan 2023 20:04:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pMaOD-0007yF-L8 for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jan 2023 20:04:29 +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 1pMaOD-0007wr-7x for pgsql-hackers@lists.postgresql.org; Mon, 30 Jan 2023 20:04:29 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pMaOB-0005NS-2b for pgsql-hackers@postgresql.org; Mon, 30 Jan 2023 20:04:28 +0000 Received: by mail-pg1-x535.google.com with SMTP id 7so3559640pgh.7 for ; Mon, 30 Jan 2023 12:04:27 -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=zu+ydD2GYhqXLN4D97UuMlu3Df6CaR6oEVpiqIB/njs=; b=Cc6ddgxoTeDya7DqrLWIVBIhN3VmIZIISJK7yhmABHf9OcGD53eMOrfOoZNyvkB970 Zw3kx6MHkdmNR01C5VevIS6t7hATM8nGczH/uQ5iEkRAqYtpzIn2fd7l4W5NCaMkEves 29xpjdHlL8rwkG4Krcm6vz/WoZP/9Zrya53xOttdli0EfWn76p7HWYhND4QC/cIICQjA GSUFZ5NYC1vg8Z14C8Chc2OH4D+VpZXhs9yYQJkF67lzMViSnJ+F6tl589iWKPQvUOtT K2jleLQr8EHOsJ8/521Q2YQz7+KICHGnULKW15pAD6SZxvPc/2To7kXc9d37y5YtytMm 0oJw== 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=zu+ydD2GYhqXLN4D97UuMlu3Df6CaR6oEVpiqIB/njs=; b=lRNjxELj4Hsr43iqRib2N8FDpisKj1swAGQkUVdDKuPSvr8SvnMIkg4/0f2QVoCLTG Sy/3comT/FpWPqR6TLQPMR3NuHhBO+6GOrmH/Jw/5btO1Am3uoncVccQImApg1axkAgL fIZBc0PgIjEWv6tlUD/I9trjByZBaqJbT4e2QSnLUnu53HQxX9xwYc91uej/EM69Vfea l2BAGCWpu9PN4KwmV+Osrv2KZ3GETU4+kE4/mufqxzwscLCa5mBlES0/MzSogPTNrkI7 Dl8EwTKsFbmaGiQNPvZGP8qPl4Lcffasdkhv3tPjkpXAAxIfgOSUee/OHqdiFjrHW5DS 0c0g== X-Gm-Message-State: AO0yUKVEg1NHcgK+zzpBIA8FtIZKpnmq1UZrA/vI29kst45CwZtsKvXy CMhJSgUCxwZJeE1HWSVmI0Y= X-Google-Smtp-Source: AK7set/Y4opmYAFg9ZGLvDK0FHmJdUiCdJI2arF81w2qU5vq3jqdTHVAvGkxeqem7YPSFbo5GxPdFA== X-Received: by 2002:aa7:85c9:0:b0:590:65f7:da5a with SMTP id z9-20020aa785c9000000b0059065f7da5amr15705157pfn.22.1675109066188; Mon, 30 Jan 2023 12:04:26 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id z19-20020a62d113000000b0058bacd6c4e8sm15098pfg.207.2023.01.30.12.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 12:04:25 -0800 (PST) Date: Mon, 30 Jan 2023 12:04:22 -0800 From: Nathan Bossart To: Andres Freund Cc: Michael Paquier , pgsql-hackers@postgresql.org Subject: Re: recovery modules Message-ID: <20230130200422.GA2797238@nathanxps13> References: <20230123214428.GA572995@nathanxps13> <20230128002319.362oxrxf7ardfz2a@awork3.anarazel.de> <20230128005910.GA2245287@nathanxps13> <20230128015542.baefifnqgpgtkij6@awork3.anarazel.de> <20230128041746.GA2288302@nathanxps13> <20230128062729.GA2570237@nathanxps13> <20230130194810.6fztfgbn32e7qarj@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230130194810.6fztfgbn32e7qarj@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jan 30, 2023 at 11:48:10AM -0800, Andres Freund wrote: > I don't think _PG_archive_module_init() should actually allocate a memory > context and do other similar initializations. Instead it should just return > 'const ArchiveModuleCallbacks*', typically a single line. > > Allocations etc should happen in one of the callbacks. That way we can > actually have multiple instances of a module. I think we'd need to invent a startup callback for archive modules for this to work, but that's easy enough. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com