[GENERAL] aggregation question

2015-12-08 Thread Chris Withers
Hi All, I hope this is quite a simple one... I have a fixtures table containing home_club and away_club, and I'd like to select the distinct list of clubs contained in all rows but in either the home_club or away_club columns. How would I do that? thanks for the help! Chris -- Sent

Re: [GENERAL] union/difference/intersection question

2015-12-08 Thread Chris Withers
On 08/12/2015 11:51, David Rowley wrote: On 9 December 2015 at 00:44, Chris Withers > wrote: Hi All, I hope this is quite a simple one... I have a fixtures table containing home_club and away_club, and I'd like to select

Re: [GENERAL] aggregation question

2015-12-08 Thread David Rowley
On 9 December 2015 at 00:44, Chris Withers wrote: > Hi All, > > I hope this is quite a simple one... > > I have a fixtures table containing home_club and away_club, and I'd like > to select the distinct list of clubs contained in all rows but in either > the home_club or

Re: [GENERAL] BDR: ALTER statement hanging

2015-12-08 Thread Selim Tuvi
Thanks Craig, the problem was that (if I remember correctly) there were absolutely no errors or warnings logged when I issued the ALTER statement. Everything seemed to operate normally except that the execution never completed. Even the fact that the node_status was set to 'i' didn't result in

Re: [GENERAL] bdr manual cleanup required

2015-12-08 Thread Selim Tuvi
Thanks Sylvain, I ran the following on all nodes and dropped the db on all but the first node and rejoined them to the cluster. Unfortunately the node_status still says "i" for the second and third nodes when I look at bdr.bdr_nodes under the first node. Under the second node, the node_status

Re: [GENERAL] bdr manual cleanup required

2015-12-08 Thread Sylvain MARECHAL
I notice this 'i' state with bdr 0.9.1 (https://github.com/2ndQuadrant/bdr/issues/145) But this is not the same problem as far as I understand. In my case, I notice this problem when constantly updating the database. (I was not able to reproduce it with 0.9.3) Note that I sometimes saw this

Re: [GENERAL] Support for hardware tokens for server/replication private key

2015-12-08 Thread Magnus Hagander
On Thu, Dec 3, 2015 at 5:31 AM, mdaswani wrote: > Hi, > > Postgres allows client-side SSL requests to use secret keys on hardware > tokens via OpenSSL engine support. Is there an equivalent way to store the > server key on a hardware token. > > Similarly, is it

[GENERAL] Deletion Challenge

2015-12-08 Thread Berend Tober
/* Deletion Challenge I want to delete all but the most recent transaction, per person, from a table that records a transaction history because at some point the transaction history grows large enough to adversely effect performance, and also becomes less relevant for retention. I have devised

Re: [GENERAL] error on pg_restore

2015-12-08 Thread Adrian Klaver
On 12/08/2015 09:00 AM, anj patnaik wrote: I created a user pguser and gave it all the privileges on database RIC. |CREATE USER pguser WITH PASSWORD ||'xyz123!'||;| |GRANT ALL PRIVILEGES ON DATABASE ||"RIC"| |to pguser;| The above does not mean what you think it does:

Re: [GENERAL] Deletion Challenge

2015-12-08 Thread Steve Crawford
If I understand correctly the value of "click" always advances and within a "click" the "cash_journal_id" always advances - not necessarily by single steps so within a fairian_id, ordering by "click" plus "cash_journal_id" would return the records in order from which you want the most recent 5 for

[GENERAL] error on pg_restore

2015-12-08 Thread anj patnaik
I created a user pguser and gave it all the privileges on database RIC. CREATE USER pguser WITH PASSWORD 'xyz123!'; GRANT ALL PRIVILEGES ON DATABASE "RIC" to pguser; The database RIC was created by user postgres earlier. Now, when I run the pg_restore I get an error: xzcat

Re: [GENERAL] Deletion Challenge

2015-12-08 Thread Adrian Klaver
On 12/05/2015 08:08 AM, Berend Tober wrote: > /* > > Deletion Challenge > > I want to delete all but the most recent transaction, per person, from a > table that records a transaction history because at some point the > transaction history grows large enough to adversely effect performance, >

Re: [GENERAL] bdr manual cleanup required

2015-12-08 Thread Craig Ringer
Are you adding more than one node at once? BDR isn't currently smart enough to handle that. Make sure to wait until one node is fully synced up before adding another. ​