Re: Schema Consolidation in PostgreSQL

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "'Wei Shan *EXTERN*'" <weishan(dot)ang(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Schema Consolidation in PostgreSQL
Date: 2015-05-08 07:50:41
Message-ID: A737B7A37273E048B164557ADEF4A58B3660D0E7@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Wei Shan wrote:
> I have a database with multiple schemas consolidated within a postgres database.
>
> I have 2 issues when working with this setup.
>
> 1. How can I ensure that there's no resource contention between the schemas? Is there any resource
> manager.
> 2. Can I get schema-level performance statistics? If I see that this schema is overloaded, I may move
> it to another server.

It is a bit weird to think of resource consumption by schema; wouldn't it make
more sense to assess resource consumption by user or session?

The only resources that can be measured by schema would be I/O or memory for shared buffers,
I guess.

There is pg_statio_all_tables and similar views that tell you how many blocks were
read from disk and from shared buffers. You could aggregate that information by schema.

For measuring shared memory usage you could install the pg_buffercache extension,
out of that view you could get the information how many buffers are used by objects in
each schema.

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2015-05-08 08:08:53 Re: Best setting for wal_sync_method
Previous Message Wei Shan 2015-05-08 06:38:20 Schema Consolidation in PostgreSQL