Re: Map WAL segment files on PMEM as WAL buffers

From: Takashi Menjo <takashi(dot)menjo(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, tsunakawa(dot)takay(at)fujitsu(dot)com, "Deng, Gang" <gang(dot)deng(at)intel(dot)com>, Takashi Menjo <takashi(dot)menjou(dot)vg(at)hco(dot)ntt(dot)co(dot)jp>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Subject: Re: Map WAL segment files on PMEM as WAL buffers
Date: 2021-11-05 06:47:33
Message-ID: CAOwnP3PS4fRNCOkGvSf1USv_bHSgQzMzn6CrbpbV1HM8nse1eQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Daniel,

The issue you told has been fixed. I attach the v5 patchset to this email.

The v5 has all the patches in the v4, and in addition, has the
following two new patches:

- (v5-0002) Support build with MSVC on Windows: Please have
src\tools\msvc\config.pl as follows to "configure --with-libpmem:"

$config->{pmem} = 'C:\path\to\pmdk\x64-windows';

- (v5-0006) Compatible to Windows: This patch resolves conflicting
mode_t typedefs and libpmem API variants (U or W, like Windows API).

Best regards,
Takashi

On Thu, Nov 4, 2021 at 5:46 PM Takashi Menjo <takashi(dot)menjo(at)gmail(dot)com> wrote:
>
> Hello Daniel,
>
> Thank you for your comment. I had the following error message with
> MSVC on Windows. It looks the same as what you told me. I'll fix it.
>
> | > cd src\tools\msvc
> | > build
> | (..snipped..)
> | Copying pg_config_os.h...
> | Generating configuration headers...
> | undefined symbol: HAVE_LIBPMEM at src/include/pg_config.h line 347
> at C:/Users/menjo/Documents/git/postgres/src/tools/msvc/Mkvcbuild.pm
> line 860.
>
> Best regards,
> Takashi
>
>
> On Wed, Nov 3, 2021 at 10:04 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> >
> > > On 28 Oct 2021, at 08:09, Takashi Menjo <takashi(dot)menjo(at)gmail(dot)com> wrote:
> >
> > > Rebased, and added the patches below into the patchset.
> >
> > Looks like the 0001 patch needs to be updated to support Windows and MSVC. See
> > src/tools/msvc/Mkvcbuild.pm and Solution.pm et.al for inspiration on how to add
> > the MSVC equivalent of --with-libpmem. Currently the patch fails in the
> > "Generating configuration headers" step in Solution.pm.
> >
> > --
> > Daniel Gustafsson https://vmware.com/
> >
>
>
> --
> Takashi Menjo <takashi(dot)menjo(at)gmail(dot)com>

--
Takashi Menjo <takashi(dot)menjo(at)gmail(dot)com>

Attachment Content-Type Size
v5-0001-Add-with-libpmem-option-for-PMEM-support.patch application/octet-stream 5.3 KB
v5-0002-Support-build-with-MSVC-on-Windows.patch application/octet-stream 2.8 KB
v5-0003-Add-wal_pmem_map-to-GUC.patch application/octet-stream 4.7 KB
v5-0004-Export-InstallXLogFileSegment.patch application/octet-stream 2.1 KB
v5-0005-Map-WAL-segment-files-on-PMEM-as-WAL-buffers.patch application/octet-stream 16.8 KB
v5-0006-Compatible-to-Windows.patch application/octet-stream 1.6 KB
v5-0007-WAL-statistics-in-cases-of-wal_pmem_map-true.patch application/octet-stream 2.2 KB
v5-0008-Let-wal_pmem_map-be-constant-unless-with-libpmem.patch application/octet-stream 1.4 KB
v5-0009-Ensure-WAL-mappings-before-assertion.patch application/octet-stream 1.4 KB
v5-0010-Update-document.patch application/octet-stream 2.0 KB
v5-0011-Preallocate-and-initialize-more-WAL-if-wal_pmem_m.patch application/octet-stream 3.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-11-05 07:31:12 Re: lastOverflowedXid does not handle transaction ID wraparound
Previous Message Michael Paquier 2021-11-05 06:30:18 Re: [PATCH] Added TRANSFORM FOR for COMMENT tab completion