Re: [GENERAL] Test failover for PosgreSql 9.2

2015-09-25 Thread Francisco Reyes
On 09/25/2015 11:20 AM, yuryu wrote: According to manual I have to kill completely Master and "touch" a trigger to make Slave new Master. You don't have to do anything in the master. If you have configured the slave to check for a file, then it will become Read Write when that file is created

[GENERAL] Listen/notify, equivalents on other DBs

2015-09-25 Thread Mark Morgan Lloyd
I'm trying to get support for PostgreSQL's listen/notify into a development environment, but since it supports multiple database backends: can anybody comment on how many other servers have a comparable facility? Minimal research has allowed me to code something for Firebird/Interbase, but I'

Re: [GENERAL] Extract giving wrong week of year

2015-09-25 Thread Tom Lane
Ben Primrose writes: > I’m seeing some odd behavior from the extract function. > Any idea why extract would think January 3rd of next year is the 53rd week > of the year? See the fine manual ... http://www.postgresql.org/docs/9.3/static/functions-datetime.html#FUNCTIONS-DATETIME

[GENERAL] Extract giving wrong week of year

2015-09-25 Thread Ben Primrose
All, I’m seeing some odd behavior from the extract function. Any idea why extract would think January 3rd of next year is the 53rd week of the year? Thanks Ben [bprimrose@primrose partitioning]$ psql Null display is "¤". Line style is unicode. Output format is wrapped. Tim

Re: [GENERAL] to pg

2015-09-25 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ramesh T Sent: Friday, September 25, 2015 7:09 AM To: pgsql-general@postgresql.org Subject: [GENERAL] to pg CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' then load_id els

[GENERAL] Test failover for PosgreSql 9.2

2015-09-25 Thread yuryu
Hello, I am new to posgresql. I've configured replication for my database . It li working fine, but I need to test failover capabilities. According to manual I have to kill completely Master and "touch" a trigger to make Slave new Master. Could you please recommend me a way to kill Master in order

Re: [GENERAL] Automatically Updatable Foreign Key Views

2015-09-25 Thread Raymond Brinzer
Well, those are two high-quality answers, and I appreciate them. Not really the news I was hoping for, of course, though I suppose it's a small consolation that the problem is not in the model, but the implementation. That leaves the possibility open in principle, at least, though the technical d

Re: [GENERAL] Postgresql HA questions

2015-09-25 Thread Israel Brewster
Thanks. I'd taken some stabs at setting up Corosync/Pacemaker, but could never get the PostgreSQL portion to work properly. One difficulty is that I am using named replication slots, which don't appear to be supported. The other issue is that the system tended to try to start my secondary as primar

Re: [GENERAL] to pg

2015-09-25 Thread Tom Lane
Alban Hertroys writes: > On 25 September 2015 at 13:08, Ramesh T wrote: >> CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' then >> load_id else null end ); >> >> how can i convert case expressed to postgres..above it is oracle. > BTW, your CASE statement isn't exactly va

Re: [GENERAL] to pg

2015-09-25 Thread Alban Hertroys
On 25 September 2015 at 13:08, Ramesh T wrote: > CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' then > load_id else null end ); > > how can i convert case expressed to postgres..above it is oracle. Assuming that your queries are written in such a way that Oracle is indeed

Re: [GENERAL] Dropped connections with pg_basebackup

2015-09-25 Thread Francisco Reyes
On 09/24/2015 04:34 PM, Alvaro Herrera wrote: Sherrylyn Branchaw wrote: Moreover, the default has been set to 0, because the bugs both in our usage and in OpenSSL code itself seem never to end. Just disable it. Set it to 0 and did not help. Likely will move all machines to have it =0 since I

Re: [GENERAL] Dropped connections with pg_basebackup

2015-09-25 Thread Francisco Reyes
On 09/24/2015 04:29 PM, Sherrylyn Branchaw wrote: I'm assuming based on the "SSL error" that you have ssl set to 'on'. What's your ssl_renegotiation_limit? The default is 512MB, but setting it to 0 has solved problems for a number of people on this list, including myself. I have also seen insta

Re: [GENERAL] to pg

2015-09-25 Thread Albe Laurenz
Ramesh T wrote: > CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' then > load_id else null end ); > > how can i convert case expressed to postgres..above it is oracle. CREATE TABLE pick (picked char(1), load_id integer); CREATE FUNCTION picked_loadid(character, integer)

Re: [GENERAL] to pg

2015-09-25 Thread Ladislav Lenart
On 25.9.2015 13:08, Ramesh T wrote: > CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' then > load_id else null end ); > > how can i convert case expressed to postgres..above it is oracle. > > any help appreciated... Hello. And what about a partial unique index as docume

Re: [GENERAL] to pg

2015-09-25 Thread Geoff Winkless
Surely just CASE picked WHEN 'y' THEN load_id ELSE NULL END or CASE WHEN picked='y' THEN load_id ELSE NULL END ? On 25 September 2015 at 12:08, Ramesh T wrote: > CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' > then load_id else null end ); > > how can i convert case

[GENERAL] to pg

2015-09-25 Thread Ramesh T
CREATE UNIQUE INDEX idx_load_pick ON pick (case picked when picked='y' then load_id else null end ); how can i convert case expressed to postgres..above it is oracle. any help appreciated...

Re: [GENERAL] Postgresql HA questions

2015-09-25 Thread Steve Pritchard
Israel, I can't answer all your questions, but we've just set up a HA pair with *Hot Standby using Corosync/Pacemaker*. However we haven't deployed this 'live' yet. We originally found a presentation from The PostgreSQL Conference PostgreSQL High Availability with Corosync/Pacemaker