Search Postgresql Archives

Re: Temporary, In-memory Postgres DB?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, I'm thinking of a small DB (could fit into mem).  And the notion
that all the data would reside in memory makes sense.  But what about
the metadata?  And there is the question of the "initdb" and all the
stuff it creates.  That goes to disk, yes? no?  

Another question, but first my tenuous understanding of how dbs are
created, up for critique...

- "initdb" creates (on disk) all the stuff you need to have before you
"createdb".
- "createdb" creates a db (puts it in the place you designated with
"initdb")
- "create schema" can be used to create multiple schemas in a singel DB.

- "drop schema" can be used to get rid of a schema within a db
- "dropdb" can be used to get rid of a db that was created with
"createdb"
Q: How does one get rid of whatever gets created with "initdb"? Is it
(gulp) just a "rm -r" ?

I do have access to scratch disks which, in effect, could be used as a
temporary storage area.  IOW, if something goes wrong, and I don't get
to delete a db that was created on the scratch disk, it'll get cleaned
up for me overnight.  It's just a question of how long it'll take to
initdb + createdb + create a db model + load.

Thanks for the expert advise !  

-dave





-----Original Message-----
From: pgsql-general-owner@xxxxxxxxxxxxxx
[mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Ron Johnson
Sent: Wednesday, November 07, 2007 10:17 AM
To: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  Temporary, In-memory Postgres DB?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/07/07 09:03, Gauthier, Dave wrote:
> This is a real longshot, but here goes...
> 
>  
> 
> Is there such a thing as a temporary, probably in-memory, version of a
> Postgres DB?  Sort of like SQLite, only with the features/function of
> PG?  A DB like this would exist inside of, and for the duration of, a
> script/program that created it, then vanish when the script/program
> ends.
> 
>  
> 
> Probably not, but if not, then this would be (IMO) a great addition to
> have, something that'd really make it distinct from MySQL .  I'd use
> SQLite, but I want to have stored functions and other "real" database
> features that it just doesn't have.

If you have enough RAM, and your database is small enough, the OS
will eventually cache the whole thing.

I know that's not exactly what you're talking about, but I think
it's as close as you'll get.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHMdcAS9HxQb37XmcRAqD9AJ4usfOq49ApqnLOz9advUnRmc7q2QCdFa8s
xAL+tMf4Xu4T4hGhvUCzomA=
=QmE5
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux