From: Tom Lane <tgl@sss.pgh.pa.us>
To: Craig A. James <cjames@modgraph-usa.com>
Cc: Chris <dmagick@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres gets stuck
Date: Thu, 11 May 2006 22:51:12 -0400
Message-ID: <19950.1147402272@sss.pgh.pa.us> (raw)
In-Reply-To: <4463EE89.8010103@modgraph-usa.com>
References: <446135F9.1060608@modgraph-usa.com>
<4461391D.2000800@gmail.com>
<44635DFE.1060509@modgraph-usa.com>
<18707.1147392206@sss.pgh.pa.us>
<4463EE89.8010103@modgraph-usa.com>
"Craig A. James" <cjames@modgraph-usa.com> writes:
> I guess I misinterpreted the Postgress manual, which says (in 31.9, "C Language Functions"),
> "When allocating memory, use the PostgreSQL functions palloc and pfree
> instead of the corresponding C library functions malloc and free."
> I imagined that perhaps palloc/pfree used mutexes for something. But if I understand you, palloc() and pfree() are just wrappers around malloc() and free(), and don't (for example) make their own separate calls to brk(2), sbrk(2), or their kin.
Correct. palloc/pfree are all about managing the lifetime of memory
allocations, so that (for example) a function can return a palloc'd data
structure without worrying about whether that creates a long-term memory
leak. But ultimately they just use malloc/free, and there's certainly
not any threading or mutex considerations in there.
> No threading anywhere. None of the libraries use threads or mutexes. It's just plain old vanilla C/C++ scientific algorithms.
Darn, my best theory down the drain.
>> Or it could be a garden variety glibc bug. How up-to-date is your
>> platform?
> I guess this is the next place to look.
Let us know how it goes...
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, cjames@modgraph-usa.com, dmagick@gmail.com
Subject: Re: Postgres gets stuck
In-Reply-To: <19950.1147402272@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox