Re: Temporary Files

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: "Campbell, Lance" <lance(at)illinois(dot)edu>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Temporary Files
Date: 2021-03-29 20:49:09
Message-ID: CAH2-Wz=F7-92QM7nYE_-JrjUhPVbHo4npdDYQZruFdwy+JYO_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Mar 29, 2021 at 11:10 AM Campbell, Lance <lance(at)illinois(dot)edu> wrote:
> If you divide 451 by 21 you get 21.4 . I would have expected to see an average size greater than 24 MB. This implies to me that PostgreSQL is creating temp files that are smaller than 24 MB.
>
> What am I not understanding?

work_mem limits the in-memory space used by sort and hash operations.
It doesn't necessarily follow that the on-disk footprint is exactly
(or even approximately) the same as the in-memory footprint for any
given operation that barely can't fit in memory. The precise space
overheads will vary based on lots of factors, most of which are
implementation details.

--
Peter Geoghegan

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ivan Petrov 2021-03-29 23:20:30 Improve postgres 13.2 performance for concurrent bulk insert
Previous Message Campbell, Lance 2021-03-29 18:10:39 Temporary Files