Skip site navigation (1) Skip section navigation (2)

Re: single task postgresql

From: Greg Copeland <greg(at)CopelandConsulting(dot)Net>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: single task postgresql
Date: 2002-02-27 23:03:23
Message-ID: 3C7D65BB.4070701@copelandconsulting.net (view raw or flat)
Thread:
Lists: pgsql-hackers

mlw wrote:
> Oleg Bartunov wrote:
> 
>>On Wed, 27 Feb 2002, mlw wrote:
>>
>>
[Greg's ramblings removed]

>>
>>do you consider to work on this issue ?
>>
> 
> Yea, let me think about it. What is your time frame? When I offered to work on
> it, I thought it could be a leasurely thing. I have to get a machine running
> some form of Windows on which to develop and test.
> 
> I want to say yes, and if no one else does it, I will, but I'm not sure what
> your timeframe is. If it is the mystical 7.3, then sure I can do it easily. If
> you need something quickly, I can help, but I don't think I could shoulder the
> whole thing.


It appears that cygipc's shared memory implementation boils down to 
pretty much this section of code.  As extracted from shm_connect in shm.c:

    GFdShm  = open(CYGWIN_IPCNT_FILESHM, O_RDWR, 00666 ) ;
    shareadrshm = (CYGWIN_IPCNT_SHMSTR *)
    		mmap(0, sizeof(CYGWIN_IPCNT_SHMSTR), PROT_WRITE|PROT_READ,
			MAP_SHARED, GFdShm, 0) ;
    if( shareadrshm == (CYGWIN_IPCNT_SHMSTR *) -1 )
    {
     close (GFdShm) ;
     return (0) ;
    }


So, I guess the question of the day is, how is Cygwin handling mmap() 
calls??

Perhaps looking to see if Cygwin can support page file access via 
INVALID_HANDLE_VALUE to the *assumed* CreateFileMapping call??  I get 
the impression that you already understand this, however, I thought I'd 
go ahead and toss this out there.  By using the INVALID_HANDLE_VALUE 
(0xFFFFFFFF) value during's initial mapped file's creation, it is 
actually being backed by the VM's page file rather than a distinct file 
layered on top of the FS.

As you said earlier, this may provide for less disk contension, however, 
I'm doubtful you're going to find a significant speed improvement.  Just 
the same, I guess a couple percent here and there can add up.

In case you can't tell, I'm somewhat interested in this thread.  When 
you get ready to do the implementation, I wouldn't mind kicking the code 
around a little.  Of course, being that pesky voice that says, "what 
about this..." can just be plain fun too.  ;)

Greg








In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-02-27 23:04:09
Subject: Re: missing foreign key fails silently using COPY
Previous:From: Neil ConwayDate: 2002-02-27 22:34:58
Subject: Re: eWeek Poll: Which database is most critical to your

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group