Re: Direct I/O

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Noah Misch <noah(at)leadboat(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Direct I/O
Date: 2023-04-10 07:27:27
Message-ID: CA+hUKGLrqOPsriO=pnYDBHcnMh9hzhxC-ds+yudRAT4GEE3Eqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 10, 2023 at 2:57 PM Andres Freund <andres(at)anarazel(dot)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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-04-10 07:40:52 Re: Direct I/O
Previous Message Andrea Gelmini 2023-04-10 07:04:22 Re: Direct I/O