Re: POSIX question - Mailing list pgsql-hackers

From Markus Wanner
Subject Re: POSIX question
Date
Msg-id 4E073E65.8080805@bluegap.ch
Whole thread Raw
In response to POSIX question  (Radosław Smogura <rsmogura@softperience.eu>)
List pgsql-hackers
Radek,

On 06/20/2011 03:27 PM, Radosław Smogura wrote:
> When playing with mmap I done some approach how to deal with growing
> files, so...

Your approach seems to require a SysV alloc (for nattach) as well as
POSIX shmem and/or mmap.  Adding requirements for these syscalls
certainly needs to give a good benefit for Postgres, as they presumably
pose portability issues.

> 3. a. Lock header when adding chunks (1st chunk is header) (we don't
> want concurrent chunk allocation)

Sure we don't?  There are at least a dozen memory allocators for
multi-threaded applications, all trying to optimize for concurrency.
The programmer of a multi-threaded application doesn't need to care much
about concurrent allocations.  He can allocate (and free) quite a lot of
tiny chunks concurrently from shared memory.

Regards

Markus Wanner


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Repeated PredicateLockRelation calls during seqscan
Next
From: Tom Lane
Date:
Subject: Re: Range Types, constructors, and the type system