[GENERAL] Index Advice in PG

2015-06-17 Thread Jony Cohen
Hi list, I am happy to announce the new release of pg_idx_advisor version 0.1.2. This is a PostgreSQL extension which allows a user to get index advice from the DB optimizer. It's the first "stable" release so please don't go running this on your production environment :) But, I'd greatly apprecia

Re: [GENERAL] scaling postgres

2015-08-03 Thread Jony Cohen
Hi, I'd recommend looking into 2 solutions here, depending if you want to keep the data or not and how "fault tolerant" is the app (could you loose data from the last hour?) If you could loose some data and you don't intend keeping the whole data set - I'd look at using RAM as your storage - it's t

Re: [GENERAL] Postgresql-9.1 CentOS7 effective_cache_size issue

2015-08-11 Thread Jony Cohen
Hi, effective_cache_size is used only for query planing - you will not see it in vmstat etc. the default is 128mb, meaning you'd expect to see major differences when running with 128mb vs 80GB of effective cache. I'd take a look at your execution plans - I think you would find them very different

Re: [GENERAL] repmgr won't update witness after failover

2015-08-13 Thread Jony Cohen
Hi Aviel, you can use the 'show cluster' command to see the repmgr state before you do the 2nd failover - make sure the node1 is indeed marked as replica. After a failover the Master doesn't automatically attach to the new master - you need to point him as a slave (standby follow - if possible...)

Re: [GENERAL] repmgr won't update witness after failover

2015-08-16 Thread Jony Cohen
Hi, The clone command just clones the data from node2 to node1, you need to also register it with the `force` option to override the old record. (as if you're building a new replica node...) see: https://github.com/2ndQuadrant/repmgr#converting-a-failed-master-to-a-standby Regards, - Jony On Su

Re: [GENERAL] First-class Polymorphic joins?

2015-08-17 Thread Jony Cohen
Hi, You can do this today using inheritance. define a table "tagable" with person & blog as child tables. than you could run queries like: select * from tags JOIN tagable on (tag_id = tag_fk); tag_id | tag_desc | id | tag_fk | data +--+++--

Re: [GENERAL] efficient math vector operations on arrays

2015-12-27 Thread Jony Cohen
Hi, Don't know if it's exactly what you're looking for but the MADLib package has utility function for matrix and vector operations. see: http://doc.madlib.net/latest/group__grp__array.html Regards, - Jony On Fri, Dec 25, 2015 at 9:58 PM, Jim Nasby wrote: > On 12/24/15 1:56 AM, Pavel Stehule w

Re: [GENERAL] understanding postgres backend process memory usage

2016-04-17 Thread Jony Cohen
Hi David, How many different table/objects do you read from and do you use bind variables? Each postmaster process keeps internal dictionary on objects and queries ran - If you have too many objects or queries planned you might take up too much ram. If this is indeed your situation, you might bene