Re: Releasing memory during External sorting? - Mailing list pgsql-hackers

From Pailloncy Jean-Gerard
Subject Re: Releasing memory during External sorting?
Date
Msg-id AC85B14C-FFB0-455B-88E3-6997B46269BE@rilk.com
Whole thread Raw
In response to Re: Releasing memory during External sorting?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Releasing memory during External sorting?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
> On most platforms it's quite unlikely that any memory would
> actually get
> released back to the OS before transaction end, because the memory
> blocks belonging to the tuplesort context will be intermixed with
> blocks
> belonging to other contexts.  So I think this is pretty pointless.
> (If you can't afford to have the sort using all of sort_mem, you've
> set
> sort_mem too large, anyway.)
On OpenBSD 3.8 malloc use mmap(2) and no more sbrk.
So, as soon as the bloc is free, it returns to the OS.
Access to the freed pointer crashs immediatly.

Cordialement,
Jean-Gérard Pailloncy



pgsql-hackers by date:

Previous
From: Bricklen Anderson
Date:
Subject: Re: R: Table Partitioning is in 8.1
Next
From: "Lee, Patricia S."
Date:
Subject: PgAdmin3 1.2.2 Install on Win32 Disrupts Pg Service