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 1n5h6U-00065p-Vi for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 04:43:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5h6T-0008E4-55 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jan 2022 04:43:49 +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 1n5h6S-0008Dv-OC for pgsql-hackers@lists.postgresql.org; Fri, 07 Jan 2022 04:43:48 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5h6L-0002oG-Un for pgsql-hackers@postgresql.org; Fri, 07 Jan 2022 04:43:48 +0000 Received: by mail-io1-xd2d.google.com with SMTP id o7so5697582ioo.9 for ; Thu, 06 Jan 2022 20:43:41 -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=OxZQKW82hdgNfOgHT+g6/+TUgS+7z2Qe1rliuSmb6/0=; b=41wKsuf2HtZsMdRKxqatH4rTpZap4ewiCzrSiNhsBlMJvog9dDf4RGhpCc/a1ioPXM 3my5uYuya8KT02IPtM1tzhxm8dYRal7I+w4pJv7C2mxeJcW7LeuI2q0K4RBlNrxyHl1k OGO0/veql8lrvS9vb15HRlzABGWfbHEZW06WVnjuzyEY7rF3mqLLlgt8qcY6BUue66pZ l023FImcnIQKZ9F0dC9rTlqWgfhdeBv/txi/pX85zaRQoWoKOIC41PTwgWCPLqwTOIH6 a1u/NfGzkfxoAOxQ5acKz7pr1Tr7/mgvxx5PAaoj2Y0ZSYPlk33ffMwqx7qDHlh5voj6 h75Q== 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=OxZQKW82hdgNfOgHT+g6/+TUgS+7z2Qe1rliuSmb6/0=; b=mYa5H7n8r5kKLVWDZAWOjbnUlyrRPY8uV4xmCPb4zR5aLao52HsNtI1D+cZrHZnrRd A0r6/nYcOqwZbxPaylDF48LJZLzZ8eI2WFqxtuHZR4uT4BQtU9eoVbuUxH0yNZdAQdI7 6zfxPvh4Gs3T2zcC4N6vofpqxYdL03YWo68TlIlGSVo/lLFx89/DxRj5Ako4b39ulBiz uufVxqK+GGGwLHcdKoY3MljxPwO+yNMg2iB/PmNuokO0VctShXrsn/K2uweOag6G+aFa YVijzHF6vHBTr4Lt21rb9867vEVBGDVqj1ZUbvO4qYEhf+Px3aPGc3C460Kn5u2Pf6xb Boyg== X-Gm-Message-State: AOAM531s5F3LtRZpSyKEfEwN3xol40oh4Df4pi254wwAnZNDsNpjqCH0 Z5U0KZ9e4UPNeClxi6H3EDZZNA== X-Google-Smtp-Source: ABdhPJyEBM06sL0RFm3FrIpvz6akVc+3dw+4f9YEEpy+Sxi3Rp0f0RtXJlsHwmpr7fEq86+OQ/HcCw== X-Received: by 2002:a02:ca1a:: with SMTP id i26mr30790779jak.296.1641530619529; Thu, 06 Jan 2022 20:43:39 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id s2sm2294537ioo.16.2022.01.06.20.43.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jan 2022 20:43:38 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 8268C8023E3; Thu, 6 Jan 2022 22:43:37 -0600 (CST) Date: Thu, 6 Jan 2022 22:43:37 -0600 From: Justin Pryzby To: Takashi Menjo Cc: Thomas Munro , pgsql-hackers@postgresql.org, Tomas Vondra , Masahiko Sawada , Heikki Linnakangas , "Tsunakawa, Takayuki" , "Deng, Gang" , Takashi Menjo , Matthias van de Meent , Daniel Gustafsson Subject: Re: Map WAL segment files on PMEM as WAL buffers Message-ID: <20220107044337.GB14051@telsasoft.com> References: <20220106040000.GU14051@telsasoft.com> <20220106051908.GV14051@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, Jan 07, 2022 at 12:50:01PM +0900, Takashi Menjo wrote: > > But in this case it really doesn't work :( > > > > running bootstrap script ... 2022-01-05 23:17:30.244 CST [12088] FATAL: file not on PMEM: path "pg_wal/000000010000000000000001" > > Do you have a real PMEM device such as NVDIMM-N or Intel Optane PMem? No - the point is that we'd like to have a way to exercise this patch on the cfbot. Particularly the new code introduced by this patch, not just the --without-pmem case... I was able to make this pass "make check" by adding this to main() in src/backend/main/main.c: | setenv("PMEM_IS_PMEM_FORCE", "1", 0); I think you should add a patch which does what Thomas suggested: 1) add to ./.cirrus.yaml installation of the libpmem package for debian/bsd/mac/windows; 2) add setenv to main(), as above; 3) change configure.ac and guc.c to default to --with-libpmem and wal_pmem_map=on. This should be the last patch, for cfbot only, not meant to be merged. You can test that the package installation part works before mailing patches to the list with the instructions here: src/tools/ci/README: Enabling cirrus-ci in a github repository.. > If you don't, you have two alternatives below. Note that neither of > them ensures durability. Each of them is just for testing. > 2. Set the environment variable PMEM_IS_PMEM_FORCE=1 to tell libpmem > to treat any devices as if they were PMEM. The next revision should surely squish all the fixes into their corresponding patches to be fixed. Each of the patches ought to be compile and pass tests without depending on the "following" patches: 0001 without 0002-, 0001-0002 without 0003-, etc. -- Justin