Re: ShmemAlloc errors - Mailing list pgsql-general

From Tom Lane
Subject Re: ShmemAlloc errors
Date
Msg-id 22143.1066398554@sss.pgh.pa.us
Whole thread Raw
In response to Re: ShmemAlloc errors  (Nick Burrett <nick@dsvr.net>)
Responses Re: ShmemAlloc errors  (Nick Burrett <nick@dsvr.net>)
List pgsql-general
Nick Burrett <nick@dsvr.net> writes:
> Tom Lane wrote:
>> We don't normally hear of people needing that --- is there anything
>> unusual about the schema of this database?

> Not particularly.  The database consists of around 3000 tables created
> using this:

> CREATE TABLE vs_foo (date date NOT NULL,
>                       time time NOT NULL,
>                       bytesin int8 CHECK (bytesin >= 0),
>                       bytesout int8 CHECK (bytesout >= 0));

> Each table has around 1500 rows.

3000 tables?  That's why you need so many locks.  Have you thought about
collapsing these into *one* table with an extra key column?  Also, it'd
likely be better to combine the date and time into a timestamp column.

            regards, tom lane

pgsql-general by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: VACUUM degrades performance significantly. Database
Next
From: Martin_Hurst@dom.com
Date:
Subject: connecting to external database tables outside of the postgres database