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 1nJ4SW-0006TY-W6 for pgsql-hackers@arkaria.postgresql.org; Sun, 13 Feb 2022 02:17:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJ4SV-0004dO-QS for pgsql-hackers@arkaria.postgresql.org; Sun, 13 Feb 2022 02:17:51 +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 1nJ4SV-0004Zm-BS for pgsql-hackers@lists.postgresql.org; Sun, 13 Feb 2022 02:17:51 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nJ4SS-0006CO-7d for pgsql-hackers@lists.postgresql.org; Sun, 13 Feb 2022 02:17:50 +0000 Received: by mail-il1-x12c.google.com with SMTP id n5so9833190ilk.12 for ; Sat, 12 Feb 2022 18:17:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fkK4DUyTPqWhCO415hBp1WeQnbc1P7SlQzjL2bxQPJU=; b=q0xzLryV/e4YsGiknmK6VlI8EMvgKk47WiO9rqryH02RM4uuVcC+UFLMk66fSzXpVe teEhZe9saV9cZzxhq4d7h9P1++jiKCpfDLaFzl/zyvKK5G5J3YzVUFSlyxOVrKpWu7e2 YUW5B5JCSCsTJT159Ntk/EKtpqwLPU3fIpSHhrraGrLM6RkPGR9fR+1vFtaFMLvyoh5w Wv8ekuc4uirIX4ge3qkp1dg07yrIgzjZIxo9EIyd7uz8x5j6NYrxep2GCm8eUAlRiTHW DUmTR9c/gAtkR1u9CclYiHpG6HWQTZmwO6VgPCl7czl+mudFd8TmRlGtQtHdKR0LFTkl myaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fkK4DUyTPqWhCO415hBp1WeQnbc1P7SlQzjL2bxQPJU=; b=6QvdsfWa49dKX5rTn9boLt6XrkUyr6rvoxOr1cI6sKQEBBA81rMFy1VVqkwwS/rOnN onF/kzWmNlOJPBV+IQ5jky4hzUenX4M0ZPVH4Jje7k+OYuSHNWcNLRKYMxhuaKTG8vWf K0WP5gbRePMN9bPkWnhqzkUKkvNigmvHcT1r2lbqrar/CAJGzQp1EFAdDaduTR71wpTv lXM9AetuOmcSDAB2xinTcpnpMJywx5ctUXJZ1bmV7W3D+Ibo9BvuX9wppUXp69wghSdT 7AWgmc4FTPB3M4TqfakGVanAz/8m1sgcEBOeKNrxl7AXrAeWu3bU4xujR6fDdFnqEr33 ENbw== X-Gm-Message-State: AOAM531Z1x8qH73uBYcHijrHr8jnOb04tWffMlCf4BoSXoDqs3dH8Pa7 0iAR6NgWGEeGMJbP5nUV7/Am9A== X-Google-Smtp-Source: ABdhPJx+tRsZEw0qVReqc04OftN0w9nkkYBUcAkL0SLYZgKwpS3k8N9Bi1WibvzZoIDvfGwgBIxI4A== X-Received: by 2002:a05:6e02:174f:: with SMTP id y15mr4706472ill.315.1644718667515; Sat, 12 Feb 2022 18:17:47 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id o22sm16870239iow.37.2022.02.12.18.17.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Feb 2022 18:17:47 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 7AAB28006C6; Sat, 12 Feb 2022 20:17:46 -0600 (CST) Date: Sat, 12 Feb 2022 20:17:46 -0600 From: Justin Pryzby To: Andres Freund Cc: Robert Haas , Alvaro Herrera , Andrew Dunstan , Dilip Kumar , Heikki Linnakangas , pgsql-hackers@lists.postgresql.org Subject: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints Message-ID: <20220213021746.GM31460@telsasoft.com> References: <202202112108.mmy2r4g7zj7o@alvherre.pgsql> <20220213020044.dh7y4emjhom5jhv6@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220213020044.dh7y4emjhom5jhv6@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Feb 12, 2022 at 06:00:44PM -0800, Andres Freund wrote: > Hi, > > On 2022-02-11 16:19:12 -0500, Robert Haas wrote: > > I somewhat hope we never end up with THREE strategies for creating a new > > database, but now that I think about it, we might. Somebody might want to > > use a fancy FS primitive that clones a directory at the FS level, or > > something. > > I think that'd be a great, and pretty easy to implement, feature. But it seems > like it'd be mostly orthogonal to the "WAL log data" vs "checkpoint data" > question? On the primary / single node system using "WAL log data" with "COW > file copy" would work well. > > I bet using COW file copies would speed up our own regression tests noticeably > - on slower systems we spend a fair bit of time and space creating template0 > and postgres, with the bulk of the data never changing. > > Template databases are also fairly commonly used by application developers to > avoid the cost of rerunning all the setup DDL & initial data loading for > different tests. Making that measurably cheaper would be a significant win. +1 I ran into this last week and was still thinking about proposing it. Would this help CI or any significant fraction of buildfarm ? Or just tests run locally on supporting filesystems. Note that pg_upgrade already supports copy/link/clone. (Obviously, link wouldn't do anything desirable for CREATE DATABASE). -- Justin