Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Is there failover server parameter in PostgreSQL connection string that can be used to automatically switch from primary server to secondary sever ?

We have been using similar functionality on MS SQL Server, but now we have switched to PosgreSQL 9.3 and searching for something similar.

UPDATE

I'm using .Net C#, DevArt dotConnect for PostgreSQL driver

share|improve this question
    
What client and language are you using? libpq? psqlODBC? PgJDBC? There is for PgJDBC (with limitations); I don't think so for the other drivers. People generally use server-side failover using pgbouncer or pgpool-II. –  Craig Ringer Jan 30 '14 at 1:04
    
We are trying pgBouncer on Windows right now and we will see how that turns out, we tried pgPool II-3.0 on Linux but it seems that he requires PostgreSQL Server installed on the same machine which isn't an option right now from infrastructure stand point. I'm using .Net C#, DevArt dotConnect for PostgreSQL driver. –  khorvat Jan 30 '14 at 7:35
    
Ok, you're using a closed 3rd party driver, so you'll need to chase them up about whether there's client-side failover support in it. –  Craig Ringer Jan 30 '14 at 8:39
    
Ok, I thought so but wanted to check that. Do you know if Npgsql supports such thing ? –  khorvat Jan 30 '14 at 8:55
    
Not AFAIK; their roadmap (if up to date) says it's not implemented. Best resource is the documentation and Google. Most people use server-side failover with HAProxy / Pgbouncer. Client failover is only useful for read-only work anyway. –  Craig Ringer Jan 30 '14 at 8:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.