Re: do separate databases have any impact each other? - Mailing list pgsql-general

From Christopher Browne
Subject Re: do separate databases have any impact each other?
Date
Msg-id m3r7cuk60b.fsf@mobile.int.cbbrowne.com
Whole thread Raw
In response to do separate databases have any impact each other?  (TJ O'Donnell <tjo@acm.org>)
List pgsql-general
> While writing installation instructions for my new PostgreSQL
> product, I found myself writing the following sentence: "For first
> time users, we recommend building the gnova database, since it has
> no impact on other databases."
>
> Is this really true?  Of course, my gnova database will take some
> disk space, but other than that can y'all think of other concerns a
> big production database admin might have about installing a new
> (smallish) database?  Is it true that if no one has begun a session
> involving my database, it simply sits on disk and cannot possibly
> interfere with other databases/sessions?  When a session ends that
> had opened my database, do all traces of it disappear, except its
> life on disk?  How about .so's it might have caused to be loaded?

There are various indirect effects that one database may have on
another.

- They share a single set of shared buffers

  I have seen cases where storing application logs in the same
  database as the application used had the detrimental effect that the
  logs would chew up shared buffer cache, which hurt performance

- _Any_ long running transaction on the cluster prevents vacuums from
  taking useful effect.

  That is, if I have a connection open in transaction in Database A,
  as of time t[1000] vacuuming can do no good on any subsequent
  activity after time t[1000] in *any* database.

  We experienced a problem with this where we had a PG backend hosting
  a replicated ticketing database, where replication blows quickly
  through tuples in pg_listener, amongst other thing.  There was also
  an application using some funky Perl database module that would hold
  connections open literally for days at a time.  Those connections
  would prevent vacuums from doing any good :-(.  We had to separate
  those databases as a result.

On the other hand, if a database sits on the cluster mostly unused,
and connections are opened comparatively briefly, there shouldn't be
any big problem.
--
(reverse (concatenate 'string "moc.liamg" "@" "enworbbc"))
http://cbbrowne.com/info/
If we were meant to fly, we wouldn't keep losing our luggage.

pgsql-general by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Postgresql Books: Which one ?
Next
From: Alvaro Herrera
Date:
Subject: Re: do separate databases have any impact each other?