Re: Temporary Files - Mailing list pgsql-admin

From Peter Geoghegan
Subject Re: Temporary Files
Date
Msg-id CAH2-Wz=F7-92QM7nYE_-JrjUhPVbHo4npdDYQZruFdwy+JYO_A@mail.gmail.com
Whole thread Raw
In response to Temporary Files  ("Campbell, Lance" <lance@illinois.edu>)
List pgsql-admin
On Mon, Mar 29, 2021 at 11:10 AM Campbell, Lance <lance@illinois.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
impliesto 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



pgsql-admin by date:

Previous
From: "Campbell, Lance"
Date:
Subject: Temporary Files
Next
From: Ivan Petrov
Date:
Subject: Improve postgres 13.2 performance for concurrent bulk insert