Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-06 Thread Robert Treat
On Thursday 05 July 2007 13:52, Joshua D. Drake wrote: > A.M. wrote: > > On Jul 5, 2007, at 13:20 , Andrew Sullivan wrote: > >> On Sun, Jul 01, 2007 at 11:11:30PM +0200, Alexander Todorov wrote: > >>> The question was is there something else that exists in PostgreSQL and > >>> will do the same job.

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-05 Thread PFC
Why not have a table type that writes no WAL and is truncated whenever postgres starts? Such a table could then be put in a ramdisk tablespace and there would be no transaction atomicity repercussions. Is there something I'm missing? Is this not in the TODO (if not already schedul

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-05 Thread Joshua D. Drake
A.M. wrote: On Jul 5, 2007, at 13:20 , Andrew Sullivan wrote: On Sun, Jul 01, 2007 at 11:11:30PM +0200, Alexander Todorov wrote: The question was is there something else that exists in PostgreSQL and will do the same job. Why not have a table type that writes no WAL and is truncated wheneve

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-05 Thread A.M.
On Jul 5, 2007, at 13:20 , Andrew Sullivan wrote: On Sun, Jul 01, 2007 at 11:11:30PM +0200, Alexander Todorov wrote: The question was is there something else that exists in PostgreSQL and will do the same job. Why re-invent the wheel, and make it square? But also, if you don't care whethe

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-05 Thread Andrew Sullivan
On Sun, Jul 01, 2007 at 11:11:30PM +0200, Alexander Todorov wrote: > The question was is there something else that exists in PostgreSQL and > will do the same job. Why re-invent the wheel, and make it square? But also, if you don't care whether you keep your data, why on earth are you putting it

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
"Alexander Todorov" <[EMAIL PROTECTED]> writes: > On 7/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> The fresh-initdb approach is more likely to work without any strange >> corner cases. If you try a setup where the system catalogs are on >> persistent storage but you have a tablespace on ramdisk,

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/2/07, Tom Lane <[EMAIL PROTECTED]> wrote: David Fetter <[EMAIL PROTECTED]> writes: > On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: >> So mount a ramdisk and initdb in there. > You could also put a tablespace on a ramdisk and create the table > there. Thanks for this hint

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alvaro Herrera
David Fetter escribió: > On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: > > Alexander Todorov escribió: > > > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > > >That's why I asked if you thought losing data at crash was a > > > >feature > > > Yes it is. I don't want to actually

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: >> So mount a ramdisk and initdb in there. > You could also put a tablespace on a ramdisk and create the table > there. The fresh-initdb approach is more likely to work without any strange c

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread David Fetter
On Sun, Jul 01, 2007 at 03:55:11PM -0400, Alvaro Herrera wrote: > Alexander Todorov escribió: > > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > >That's why I asked if you thought losing data at crash was a > > >feature > > Yes it is. I don't want to actually save the data on disk. > So mount a

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alvaro Herrera
Alexander Todorov escribió: > On 7/1/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > >So mount a ramdisk and initdb in there. > > As I wrote in my first post that is the straight forward approach. > The question was is there something else that exists in PostgreSQL and > will do the same job. Wha

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/1/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: So mount a ramdisk and initdb in there. As I wrote in my first post that is the straight forward approach. The question was is there something else that exists in PostgreSQL and will do the same job. ---(end of broadc

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alvaro Herrera
Alexander Todorov escribió: > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: > >That's why I asked if you thought losing data at crash was a feature > Yes it is. I don't want to actually save the data on disk. So mount a ramdisk and initdb in there. -- Alvaro Herrera http

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: That's why I asked if you thought losing data at crash was a feature Yes it is. I don't want to actually save the data on disk. ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
"Alexander Todorov" <[EMAIL PROTECTED]> writes: > On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> As long as shared_buffers is high enough, there doesn't seem to be much >> point in worrying about this; the incremental performance gain will be >> minimal since everything will be in RAM anyway. >

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
On 7/1/07, Tom Lane <[EMAIL PROTECTED]> wrote: As long as shared_buffers is high enough, there doesn't seem to be much point in worrying about this; the incremental performance gain will be minimal since everything will be in RAM anyway. Yes it will be but this does not mean there will be no di

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Tom Lane
"Alexander Todorov" <[EMAIL PROTECTED]> writes: > is there anything to emulate the MySQL memory table engine? > A straight forward solution is to create a ramfs volume and mount/link > content under /var/lib/postresql there. Then add some scripts to > save/restore databases when the server restarts

[GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread Alexander Todorov
Hello, is there anything to emulate the MySQL memory table engine? A straight forward solution is to create a ramfs volume and mount/link content under /var/lib/postresql there. Then add some scripts to save/restore databases when the server restarts. I am wondering is there something else? Greet