Re: PGSQL or other DB?

From: Erik Jones <ejones(at)engineyard(dot)com>
To: durumdara <durumdara(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PGSQL or other DB?
Date: 2009-02-03 23:13:08
Message-ID: C2D5111D-A74C-4D26-B6D9-DF4BF07D14E1@engineyard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Feb 2, 2009, at 12:23 AM, durumdara wrote:

> Hi!
>
> 2009.01.31. 10:13 keltezéssel, Erik Jones írta:
>>
>> On Jan 30, 2009, at 11:37 AM, durumdara wrote:
>>
>>> The main viewpoints:
>>> - quick (re)connect - because mod_python basically not store the
>>> database connections persistently
>>
>> mod_python is not a database adaptor.
> Yes, I know. But because of mod_python (apache) commonly configured
> to "1 interpreter/1 request", I need to reconnect with the adapter.
> But I tested it, and it is seems to be have enough speed. If not, I
> must use some proxy server to keep them alive.

There are various connection pooling softwares available such as
pgpool or pgbouncer for that.

>> rewrite the table data and previously existing indexes as well.
>> What's more, Postgres allows you to create real tablespaces so that
>> you can place individual persistent database objects (databases,
>> tables, indexes, and some constraints) on separate storage.
> I wanna ask that if I create a database in another tablespace, is
> the database name already stored in "main" data storage (like global
> metadata)?
> And If I makes a table or other object into this database, need I to
> define the tablespace name, or it is taken from the database
> "tablespace" name?
> For example:
> create db anything tablespace "new2"
>
> These sqls are different?
> create table any_table (a int)
> or
> create table any_table (a int) tablespace "new2".
>
> So: need I define tablespace instruction in every table/object
> creation, or not?

No, if you create a database as being in a given tablespace then all
table created in that database will go in that tablespace unless you
specify otherwise.

> And: if I store this database in another drive, and it is unmounted
> (because of any reason - like failure, etc), is it causes any
> problems with postgresql main databases (for example: service stops,
> etc). I ask about "after restart pg service", not online usage.
> So if I remove some tablespace path (directory, drive) in the level
> of the filesystem, can pg service up to serve main databases the it
> can access?
> Or is it completely die in this problem?

IIRC, the database should run fine and will just throw errors if you
try to access a database or table in a tablespace that isn't mounted.

> Thanks for your help:
> dd

You're welcome :)

Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-02-03 23:14:05 Re: what's the deal with 8.3.6 tagged, but not released yet ?
Previous Message Erik Jones 2009-02-03 22:54:30 Re: Warm Standby question