Re: [HACKERS] RAW I/O device

From: Malcolm Beattie <mbeattie(at)sable(dot)ox(dot)ac(dot)uk>
To: scrappy(at)hub(dot)org (The Hermit Hacker)
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] RAW I/O device
Date: 1999-12-06 17:25:29
Message-ID: E11v1tB-00056M-00@sable.ox.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The Hermit Hacker writes:
> If Linux is providing an Interface into the RAW file system, then this may
> change things for Oracle, since it wouldn't have to "learn" all the
> different OSs, as long as the API is the same across them all...and, my
> experience with Linux is that the API for Linux will most likely be
> different then everyone else *roll eyes*

The system admin side is slightly different from others: raw devices
have their own major number and devices, /dev/rawN and you "bind" a
raw device to any existing block device /dev/blockdev by doing
# raw /dev/rawN /dev/blockdev

However, the DBA side (or software) side isn't any different: provided
you access /dev/rawN *only* in sector chunks (i.e. multiples of 512
bytes that are 512-byte aligned) then the software doesn't care
whether it's /dev/rawN or an ordinary block device. If PostgreSQL can
guarantee (or be tweaked/enhanced to guarantee) that it only ever
reads/writes in multiples of 512 byte chunks and never does anything
"weird" (truncates, file-specific, ioctls, mmap, needing O_CREAT to
start with etc.) then it should be perfectly happy when presented with
a /dev/rawN instead of an ordinary file.

--Malcolm

--
Malcolm Beattie <mbeattie(at)sable(dot)ox(dot)ac(dot)uk>
Unix Systems Programmer
Oxford University Computing Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-12-06 18:20:10 FOREIGN KEY and shift/reduce
Previous Message Daniel Kalchev 1999-12-06 16:59:41 memory problem again