Re: [PERFORM] DB sessions 100 times of DB connections

2014-07-08 Thread Steve Crawford

On 07/03/2014 06:59 PM, Huang, Suya wrote:


BTW, I'm using the pgbadger report to check for peak connections/sessions.

*From:*pgsql-performance-ow...@postgresql.org 
[mailto:pgsql-performance-ow...@postgresql.org] *On Behalf Of *Huang, Suya

*Sent:* Friday, July 04, 2014 11:44 AM
*To:* pgsql-performance@postgresql.org
*Subject:* [PERFORM] DB sessions 100 times of DB connections

Hi,

We've experienced a DB issue yesterday and after checked the log found 
that the peak sessions is 3000 while the peak DB connections is only 
around 30. The application is having problem of pulling data but no 
warnings in DB log as it doesn't exceed max_connections.


How could this happen? How does sessions/connections work in Postgres?


As handy as pgbadger is, I have found that its max-connections values 
don't pass the "sniff test" as it generally shows peak values that 
exceed the configured number of connections. I haven't dug in to find 
out why but could conjecture that the fact that log entries are 
generally truncated to the nearest second could cause this sort of thing.


Unexpected connection buildup is often a side-effect of something else 
like a large resource-intensive query, a query holding locks that 
prevent the other connections' queries from completing or a variety of 
other things.


If you are looking to solve/prevent the undescribed "issue", please 
provide more detail.


-Steve



Re: [PERFORM] PGSQL 9.3 - billion rows

2014-07-08 Thread Josh Berkus
On 07/07/2014 06:59 AM, Nicolas Paris wrote:
> - Can postgresql support such table (this table is the fact table of a
> datamart -> many join query with dimensions tables) ?

Yes, it can.

> - If yes, I would like to test (say insert 2 billion test rows), what
> serveur configuration do I need ? How much RAM ?
> - If not, would it be better to think about a cluster or other ?
> - (Have you any idea to optimize this table ?)

Consider also trying cstore_fdw: https://github.com/citusdata/cstore_fdw


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance