Re: [GENERAL] qustion about pgaudit

2016-09-09 Thread hubert depesz lubaczewski
On Thu, Sep 08, 2016 at 03:19:59PM +, PICCI Guillermo SNOOP wrote: > Hi, > we are trying to install pgaudit in order to check its funcionality, and we'd > like to know if there is any available rpm to do this. as far as quick google search shows, pgaudit is a tool from 2ndQuadrant, a

[GENERAL] Very slow queries to stats on 9.3

2016-09-09 Thread hubert depesz lubaczewski
Hi, So, we have this situation, where there is cluster with 5 smallish databases: $ select oid, pg_database_size(oid) from pg_database; oid | pg_database_size ---+-- 1 | 6752440 12035 | 6760632 16428 | 59779475640 16427 |294947000 1203

[GENERAL] Is there a way to fix this ugliness

2016-09-09 Thread Tim Uckun
I am trying to get the child elements of a one to many table to be rolled up into a json field in the parent table. The query I am running is select ob.id ,case when array_position(array_agg(im.image_type), null) = 1 then '[]' else json_agg(row_to_json(im.*)) end as images from

Re: [GENERAL] Is there a way to fix this ugliness

2016-09-09 Thread Merlin Moncure
On Fri, Sep 9, 2016 at 8:30 AM, Tim Uckun wrote: > I am trying to get the child elements of a one to many table to be rolled up > into a json field in the parent table. The query I am running is > > select > ob.id > ,case when array_position(array_agg(im.image_type), null) = 1 then > '[]

[GENERAL] londiste re-create leaf node

2016-09-09 Thread Leonardo M . Ramé
Hi, I had a londiste3 slave server that no longer works and I want to re-create. I dropped all the pgq and londiste schemas in the leaf node manually...now I want to create the node again, but I'm getting this error: londiste3 /home/londiste/replicacion/db_esclavo.ini create-leaf node_esclav

Re: [GENERAL] londiste re-create leaf node

2016-09-09 Thread Leonardo M . Ramé
El 09/09/16 a las 10:53, Leonardo M. Ramé escribió: Hi, I had a londiste3 slave server that no longer works and I want to re-create. I dropped all the pgq and londiste schemas in the leaf node manually...now I want to create the node again, but I'm getting this error: londiste3 /home/londis

Re: [GENERAL] londiste re-create leaf node

2016-09-09 Thread Adrian Klaver
On 09/09/2016 07:15 AM, Leonardo M. Ramé wrote: El 09/09/16 a las 10:53, Leonardo M. Ramé escribió: Hi, I had a londiste3 slave server that no longer works and I want to re-create. I dropped all the pgq and londiste schemas in the leaf node manually...now I want to create the node again, but I'

Re: [GENERAL] londiste re-create leaf node

2016-09-09 Thread Tom Lane
"=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=" writes: > Mmm, built and reinstalled skytools-3.2, but now I'm getting this: > InternalError: could not load library > "/usr/lib/postgresql/9.5/lib/pgq_lowlevel.so": > /usr/lib/postgresql/9.5/lib/pgq_lowlevel.so: undefined symbol: oid_hash Looks like you bui

[GENERAL] Comibining UPDATE ... SET ... FROM (SELECT ...) with a JOIN

2016-09-09 Thread Alexander Farber
Good afternoon, I have a question please. In one table I store user ids and their IP addresses - CREATE TABLE words_users ( uid SERIAL PRIMARY KEY, ip inet NOT NULL ); And in another table I keep 2-player games and timestamps of last moves (NULL i

Re: [GENERAL] Is there a way to fix this ugliness

2016-09-09 Thread Karl Czajkowski
On Sep 10, Tim Uckun modulated: > I am trying to get the child elements of a one to many table to be > rolled up into a json field in the parent table. The query I am running > is... The problem is aggregating over the results of the left-outer join, which introduces NULLs. You can try pushing tha

Re: [GENERAL] Setup pgpool-II with streaming replication

2016-09-09 Thread Ashish Chauhan
Thanks Venkata for your reply. Currently, we have two Postgres server with master-slave streaming replication. All application servers are directly pointing to master server only. I am planning to setup new server for PgPool, at the time of divert app server to PgPool, I will pool out applicati

Re: [GENERAL] Is there a way to fix this ugliness

2016-09-09 Thread Tim Uckun
I could not make coalesce in the top level select to work even though people on the internet say it should work. I'll do the sub select that seems like it would work fine. On Sat, Sep 10, 2016 at 3:22 AM, Karl Czajkowski wrote: > On Sep 10, Tim Uckun modulated: > > I am trying to get the child e