Re: [GENERAL] Partitioning and ORM tools

2016-03-29 Thread Brian Fehrle
Here is a working example of trigger based partitioning with a view and 'do instead' that works with ORM tools using the affected rows return (example attached). The key things that make it work are: 1. RETURN NEW; (in the function after inserting into the partition) 2. INSTEAD OF INSERT (in th

Re: [GENERAL] scripted 'pg_ctl start' hangs and never finishes, goes

2012-03-28 Thread Brian Fehrle
from another server. - Brian F On 03/28/2012 04:31 PM, Brian Fehrle wrote: Hi all, OS: Linux 64bit PostgreSQL Version: 9.0.5 installed from source. - Brian F

[GENERAL] scripted 'pg_ctl start' hangs and never finishes, goes

2012-03-28 Thread Brian Fehrle
Hi all, OS: Linux 64bit PostgreSQL Version: 9.0.5 installed from source. I'm writing up a process that will bring down a warm standby cluster, tarball the data directory, then bring the warm standby back up. I'm having an issue where starting the database with pg_ctl results in the command ne

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-11-01 Thread Brian Fehrle
/2011 03:22 PM, Brian Fehrle wrote: On 10/27/2011 02:50 PM, Tom Lane wrote: Brian Fehrle writes: Hi all, need some help/clues on tracking down a performance issue. PostgreSQL version: 8.3.11 I've got a system that has 32 cores and 128 gigs of ram. We have connection pooling set up, with

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
On 10/27/2011 01:48 PM, Scott Marlowe wrote: On Thu, Oct 27, 2011 at 12:39 PM, Brian Fehrle wrote: Looking at top, I see no SWAP usage, very little IOWait, and there are a large number of postmaster processes at 100% cpu usage (makes sense, at this point there are 150 or so queries currently

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
e to concurrent update I don't believe these occurred too close to the slowdown. - Brian F On 10/27/2011 02:09 PM, Brian Fehrle wrote: On 10/27/2011 01:48 PM, Scott Marlowe wrote: On Thu, Oct 27, 2011 at 12:39 PM, Brian Fehrle wrote: Looking at top, I see no SWAP usage, very little IOWa

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
On 10/27/2011 02:27 PM, Scott Mead wrote: On Thu, Oct 27, 2011 at 2:39 PM, Brian Fehrle mailto:bri...@consistentstate.com>> wrote: Hi all, need some help/clues on tracking down a performance issue. PostgreSQL version: 8.3.11 I've got a system that has 32 cores and

Re: [GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
On 10/27/2011 02:50 PM, Tom Lane wrote: Brian Fehrle writes: Hi all, need some help/clues on tracking down a performance issue. PostgreSQL version: 8.3.11 I've got a system that has 32 cores and 128 gigs of ram. We have connection pooling set up, with about 100 - 200 persistent connec

[GENERAL] Server hitting 100% CPU usage, system comes to a crawl.

2011-10-27 Thread Brian Fehrle
Hi all, need some help/clues on tracking down a performance issue. PostgreSQL version: 8.3.11 I've got a system that has 32 cores and 128 gigs of ram. We have connection pooling set up, with about 100 - 200 persistent connections open to the database. Our applications then use these connection

Re: [GENERAL] Query performance help with 'shadow table' approach.

2011-09-14 Thread Brian Fehrle
On 09/14/2011 01:10 AM, Alban Hertroys wrote: On 13 Sep 2011, at 23:44, Brian Fehrle wrote: These queries basically do a 'select max(primary_key_column) from table group by column1, column2." Because of the group by, we would result in a sequential scan of the entire table which pr

[GENERAL] Query performance help with 'shadow table' approach.

2011-09-13 Thread Brian Fehrle
Hi all, I've got a large table that has 15 million + rows in it, and a set of queries I've been trying to speed up. The table has a primary key column, and a couple hundred other columns. These queries basically do a 'select max(primary_key_column) from table group by column1, column2." B