Re: [GENERAL] dblink connect per socket / specify cluster name

2015-12-21 Thread Magnus Hagander
On Dec 21, 2015 08:58, "james garner" wrote: > > Dear list, > > i'm running PgSQL 9.3 on Debian installed from the Debian packets. > I'm using dblink to access a different database. > When im trying to connect to the database by socket via > dblink_exec('dbname=test host=/var/run/postgresql' .. >

Re: [GENERAL] Unique index problem

2015-12-21 Thread Sterpu Victor
Seems to be working also with a single index, like this: CREATE UNIQUE INDEX lab_tests_groups_siui_uni_c ON lab_tests_groups_siui(id_lab_tests_siui, id_lab_tests_groups, valid_from, coalesce(id_lab_sample_types, 0)); -- Original Message -- From: "Pavel Stehule" To: "Sterpu Victor" Cc

Re: [GENERAL] Test disk reliability (or HGST HTS721010A9E630 surprisingly reliable)

2015-12-21 Thread Félix GERZAGUET
On Mon, Dec 21, 2015 at 12:31 AM, Jim Nasby wrote: > On 12/20/15 1:09 PM, Félix GERZAGUET wrote: > >> After reading >> http://www.postgresql.org/docs/current/static/wal-reliability.html, I >> tried the recommended diskchecker.pl >> but I am not satisfied

Re: [GENERAL] Test disk reliability (or HGST HTS721010A9E630 surprisingly reliable)

2015-12-21 Thread Bill Moran
On Mon, 21 Dec 2015 14:54:14 +0100 Félix GERZAGUET wrote: > On Mon, Dec 21, 2015 at 12:31 AM, Jim Nasby > wrote: > > > On 12/20/15 1:09 PM, Félix GERZAGUET wrote: > > > >> After reading > >> http://www.postgresql.org/docs/current/static/wal-reliability.html, I > >> tried the recommended diskche

[GENERAL] BDR error while adding 3rd node to cluster

2015-12-21 Thread Amit Bondwal
Hi Everyone, I am trying to setup three node bdr cluster, I am following the quick start guide, It is working well between first and 2nd node, but When I try to add 3rd node, it give the below error. hakuna=# SELECT bdr.bdr_group_join( local_node_name := 'node3', node_external_dsn :=

Re: [GENERAL] Session Identifiers

2015-12-21 Thread oleg yusim
Melvin, I promised to let you know results of my experiment, so here is goes: tcp_keepalives_idle = 900 tcp_keepalives_interval=0 tcp_keepalives_count=0 Doesn't terminate connection to database in 15 minutes of inactivity of psql prompt. So, it looks like that would work only for case if networ

Re: [GENERAL] Session Identifiers

2015-12-21 Thread Stephen Frost
Oleg, * oleg yusim (olegyu...@gmail.com) wrote: > tcp_keepalives_idle = 900 > tcp_keepalives_interval=0 > tcp_keepalives_count=0 > > Doesn't terminate connection to database in 15 minutes of inactivity of > psql prompt. So, it looks like that would work only for case if network > connection is br

Re: [GENERAL] Session Identifiers

2015-12-21 Thread Melvin Davidson
Pursuant to Stehen's suggestion, I've attached a scripts that you can execeute from a cron. I wrote it when I was working for a previous company that used to have users that opened connections and transaction that did nothing for a long time. Just adjust the max_time for your liking. You can also a

Re: [GENERAL] Session Identifiers

2015-12-21 Thread oleg yusim
Melvin, Stephen, Thanks for your responses, guys. I think we can finally put this topic to the bed with that - I have satisfactory answer. For those who would be interested and would dig into this topic later on, here is fairly detailed explanation on how to use pg_terminate_backend in this case,

Re: [GENERAL] Unique index problem

2015-12-21 Thread Scott Marlowe
On Sun, Dec 20, 2015 at 11:39 PM, Sterpu Victor wrote: > Thank you. > > I used the syntax with 2 indexes, it works for me. > But why does NULL != NULL? Because NULL literally means "an unknown, possibly unknowable value." You need to stop thinking of NULL as A value. It is not. -- Sent via pg

Re: [GENERAL] Unique index problem

2015-12-21 Thread John McKown
On Mon, Dec 21, 2015 at 1:00 PM, Scott Marlowe wrote: > On Sun, Dec 20, 2015 at 11:39 PM, Sterpu Victor wrote: > > Thank you. > > > > I used the syntax with 2 indexes, it works for me. > > But why does NULL != NULL? > > Because NULL literally means "an unknown, possibly unknowable value." > > Yo

Re: [GENERAL] BDR error while adding 3rd node to cluster

2015-12-21 Thread Craig Ringer
On 21 December 2015 at 22:57, Amit Bondwal wrote: > Hi Everyone, > > I am trying to setup three node bdr cluster, I am following the quick > start guide, > It is working well between first and 2nd node, but When I try to add 3rd > node, it give the below error. > > hakuna=# SELECT bdr.bdr_group_j

Re: [GENERAL] BDR error while adding 3rd node to cluster

2015-12-21 Thread Amit Bondwal
On Tue, Dec 22, 2015 at 10:05 AM, Craig Ringer wrote: > select * from bdr.bdr_connections; > Hi Craig, Thanks for your reply, These commands shows nothing on 3rd node. *on node3:-*hakuna=# select * from bdr.bdr_nodes; node_sysid | node_timeline | node_dboid | node_status | node_name | node_