concurrent postgres in NUMA cluster postgres - design OK ?

From: Mauricio Breternitz <MauricioB(at)timesn(dot)com>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: concurrent postgres in NUMA cluster postgres - design OK ?
Date: 2001-04-23 16:16:04
Message-ID: 14997DB247D7D4118EFA00D0B73F8E4E0513CC@SRVAUS02
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Folks:
I'm planning a port of Postgres to a multiprocessor
architecture in which all nodes have both local memory
and fast access to a shared memory. Shared memory it more
expensive than local memory.

My intent is to put the shmem & lock structures in
shared memory, but use a copy-in / copy-out approach to
maintain coherence in the buffer cache:
- copy buffer from shared memroy on buffer allocate
- write back buffer to shared memory when it is dirtied.

Is that enough ?

The idea sketch is as follows (mostly, changes
contained in storage/buffer/bufmgr.c):

-change BufferAlloc, etc, to create a node-local copy
of the buffer (from shared memory). Copy both the BufferDesc
entry and the buffer->data array

-change WriteBuffer to copy the (locally changed) buffer
to shared memory (this is the point in which the BM_DIRTY
bit is set). [ I am assuming the buffer is locked & this
is a safe time to make the buffer visible to other backends].

[Assume, for this discussion, that the sem / locks structs in
shared memory have been ported & work ]. Ditto for the hash access.

My concern is whether that is enough to maintain consistency
in the buffer cache (i.e, are there other places in the code
where a backend might have a leftover pointer to somewhere in
the buffer cache ? ) Because, in the scheme above, the buffer
cache is not directly accessible to the backend except via this
copy in / copy -out approach.

[BTW, I think this might be a way of providing a 'cluster'
version of Postgers, by using some global communication module to
obtain/post the 'buffer cache' values]

thanks
regards
Mauricio

Mauricio Breternitz Jr, Ph.D.
Times N Systems Inc.
1908 Kramer Ln, Braker Building B, Suite P
Austin, TX 78758
phone (512) 977 5368
mauriciob(at)timesn(dot)com

Mauricio Breternitz Jr, Ph.D.
Times N Systems Inc.
1908 Kramer Ln, Braker Building B, Suite P
Austin, TX 78758
phone (512) 977 5368
mauriciob(at)timesn(dot)com

Browse pgsql-hackers by date

  From Date Subject
Next Message Mauricio Breternitz 2001-04-23 16:41:31 concurrent Postgres on NUMA - howto ?
Previous Message Adam Rose 2001-04-23 16:08:12 Re: row name length