dbTalk Databases Forums  

In-memory PostgreSQL database

comp.databases.postgresql comp.databases.postgresql


Discuss In-memory PostgreSQL database in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
Ben Finney
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:11 AM






Marco Mariani <marco (AT) sferacarta (DOT) com> writes:

Quote:
Ben Finney wrote:

What options are there for creating and connnecting to a PostgreSQL
database that exists only in memory, similar to the same thing in
SQLite (and, I believe, MySQL)?

I don't think you would gain anything by keeping the DB in RAM with
postgres, because it's CPU-bound if there is little data.
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?

--
\ "If you can't annoy somebody there is little point in writing." |
`\ -- Kingsley Amis |
_o__) |
Ben Finney


Reply With Quote
  #42  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM






Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #43  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM



Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #44  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM



Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #45  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM



Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #46  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM



Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #47  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM



Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #48  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM



Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #49  
Old   
Marco Mariani
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:33 AM



Ben Finney wrote:

Quote:
I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

Now that we've established that I want what I actually asked for, can
someone give suggestions on how to achieve it?
I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?

Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.


Reply With Quote
  #50  
Old   
Ben Finney
 
Posts: n/a

Default Re: In-memory PostgreSQL database - 05-14-2008 , 07:52 AM



Marco Mariani <marco (AT) sferacarta (DOT) com> writes:

Quote:
Ben Finney wrote:

I'm not interested in "performance", but rather reduction in external
dependencies for unit tests (i.e. unit tests should not rely on a
running database server).

I'm not sure I understand.
You cannot connect to postgres and use all of the postgres features,
like you asked, withouth connecting to a running database server.

Is this what you're asking?
Yes. I want to connect to a PostgreSQL database without the external
dependency of a cluster and already-running server.

Quote:
Because.. with sqlite in RAM you _ARE_ using the whole stack of the
database, only there is no separate server process.
And no filesystem interaction, and no concurrency, and many other
things that come with a "dedicated to this one process" database.

All of these make it very useful for unit testing a unit of code that
would, under normal operation, connect to the concurrent database with
its on-disk cluster and all the rest.

I'm wanting to have these advantages, but have it be PostgreSQL so
that I don't have to make an in-memory SQLite database pretend to be
an in-memory PostgreSQL one.

--
\ "Pinky, are you pondering what I'm pondering?" "I think so, |
`\ Brain, but if we give peas a chance, won't the lima beans feel |
_o__) left out?" -- _Pinky and The Brain_ |
Ben Finney


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.