Re: POSIX question

From: Markus Wanner <markus(at)bluegap(dot)ch>
To: Radosław Smogura <rsmogura(at)softperience(dot)eu>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: POSIX question
Date: 2011-06-26 14:12:53
Message-ID: 4E073E65.8080805@bluegap.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-06-26 15:06:47 Re: Range Types, constructors, and the type system
Previous Message Heikki Linnakangas 2011-06-26 13:05:45 Re: Repeated PredicateLockRelation calls during seqscan