Re: [GENERAL] WAL to RAW devices ?

2007-09-02 Thread Joshua D. Drake
Alex Vinogradovs wrote: Hi guys, I've got a bunch of PosgreSQL servers connected to external storage, where a single server needs to be serving as WO database dealing with INSERTs only, and bunch of other guys need to obtain a copy of that data for RO serving, without taking resources on

[GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alex Vinogradovs
Hi guys, I've got a bunch of PosgreSQL servers connected to external storage, where a single server needs to be serving as WO database dealing with INSERTs only, and bunch of other guys need to obtain a copy of that data for RO serving, without taking resources on WO server. The idea is to

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Tom Lane
Alex Vinogradovs [EMAIL PROTECTED] writes: The idea is to have say 2 raw devices which would be used as 2 WAL segments (round-robin). RO servers will go after the one that's not used at a given time with something like xlogdump utility and produce INSERT statements to be then executed

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alex Vinogradovs
WAL segments already have their structure. Filesystem would be an overhead, plus I meantioned access to the same storage from multiple hosts - no filesystem mounting, synchronization and other problems. I figured PG folks aren't interested in adding enterprise-level storage functionality (movable

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Tom Lane
Alex Vinogradovs [EMAIL PROTECTED] writes: WAL segments already have their structure. Filesystem would be an overhead, Just because you'd like that to be true doesn't make it true. We have to manage a variable number of active segments; track whether a given segment is waiting for future use,

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alex Vinogradovs
But would it be a problem to have only 1 active segment at all times ? My inspiration pretty much comes from Oracle, where redo logs are pre-configured and can be switched by a command issued to the instance. Just because you'd like that to be true doesn't make it true. We have to manage a

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alvaro Herrera
Alex Vinogradovs wrote: WAL segments already have their structure. Filesystem would be an overhead, In this case you can choose a filesystem with lower overhead. For example with WAL you don't need a journalling filesystem at all, so using ext2 is not a bad idea. For Pg data files, you need

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alex Vinogradovs
Probably you missed that part... In my setup, I need at least 2 boxes going after those files, while 3rd box keeps on writing to them... I can't mount ext2 even in R/O mode while it's being written to by another guy. I can't unmount it before mounting exclusively on any of them either, since PG

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alex Vinogradovs wrote: Hi guys, I've got a bunch of PosgreSQL servers connected to external storage, where a single server needs to be serving as WO database dealing with INSERTs only, and bunch of other guys need to obtain a copy of that

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alex Vinogradovs
Oh well, I guess I will just use some trigger to invoke a C function and store the statements in a raw device with some proprietary format, while the actual inserts don't take place at all. In case anyone has more ideas, please let me know. On Fri, 2007-08-31 at 17:45 -0700, Joshua D. Drake

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alvaro Herrera
Alex Vinogradovs wrote: Probably you missed that part... In my setup, I need at least 2 boxes going after those files, while 3rd box keeps on writing to them... I can't mount ext2 even in R/O mode while it's being written to by another guy. I can't unmount it before mounting exclusively on

Re: [GENERAL] WAL to RAW devices ?

2007-08-31 Thread Alex Vinogradovs
Yeah, that's the trick... I need high availability with high performance and nearly real-time synchronization ;-) Also, I've got FreeBSD here... ZFS will be out with 7.0 release, plus UFS2 has snapshotting capability too. But the whole method isn't good enough anyway. Oh, I see. What I've