Re: Direct I/O - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Direct I/O
Date
Msg-id CA+hUKGLrqOPsriO=pnYDBHcnMh9hzhxC-ds+yudRAT4GEE3Eqg@mail.gmail.com
Whole thread Raw
In response to Re: Direct I/O  (Andres Freund <andres@anarazel.de>)
Responses Re: Direct I/O  (Thomas Munro <thomas.munro@gmail.com>)
Re: Direct I/O  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Mon, Apr 10, 2023 at 2:57 PM Andres Freund <andres@anarazel.de> wrote:
> Have you tried to write a reproducer for this that doesn't involve postgres?

I tried a bit.  I'll try harder soon.

> ... What kernel version did you repro
> this on Thomas?

Debian's 6.0.10-2 kernel (Debian 12 on a random laptop).  Here's how I
set up a test btrfs in case someone else wants a head start:

truncate -s2G 2GB.img
sudo losetup --show --find 2GB.img
sudo mkfs -t btrfs /dev/loop0 # the device name shown by losetup
sudo mkdir /mnt/tmp
sudo mount /dev/loop0 /mnt/tmp
sudo chown $(whoami) /mnt/tmp

cd /mnt/tmp
/path/to/initdb -D pgdata
... (see instructions further up for postgres command line + queries to run)



pgsql-hackers by date:

Previous
From: Andrea Gelmini
Date:
Subject: Re: Direct I/O
Next
From: Thomas Munro
Date:
Subject: Re: Direct I/O