3

Let's assume we had PostgreSQL version X.Y and decided to give a test-try to version Z.W. Probably, there are some changes between X.Y and Z.W that could cause a little bit of trouble :-)

It would be preferable to run Z.W in parallel with X.Y, checking whether it goes well and using only X.Y's replies for a while. Later on, having Z.W's DB "ok" we could use it as primary, discarding X.Y optionally.

Question: Is there any PostgreSQL proxy that can run queries on several servers at once?

asked Feb 16, 2012 at 4:56
1

3 Answers 3

2

Have you checked pgpool already? It has query replication as a feature (look for 'parallel query').

András Váczi
31.8k13 gold badges103 silver badges152 bronze badges
answered Sep 19, 2013 at 12:37
1
  • I think it wouldn't do, since In parallel mode, replication_mode and load_balance_mode are set to true in pgpool.conf, and I don't want select queries to be replied by server with version being tested. Commented Jun 4, 2014 at 16:58
1

first, you should check this post about common problems in version changes http://blog.endpoint.com/2010/01/postgres-upgrades-ten-problems-and.html

there is a tool named DBLink in postgreSQL, it is possible to create triggers and link them to Z.W version using dbLink and check if everything is ok.

another option you can run paralel queries on both servers and watch logs. but this can be possible on application side.

and also there is 3rd. party tool named pl/proxy http://wiki.postgresql.org/wiki/PL/Proxy

answered Feb 16, 2012 at 8:36
4
  • The 3rd is kinda off-topic. I knew there's PL/Proxy. I don't know however how could it answer my question. Do you? I need no just function calls. I wanna all queries to be transparently being processed on secondary server (as well as on primary). The only thing app would need is usual host/port. The rest would be a black box for it. Commented Feb 16, 2012 at 10:46
  • The 2nd is too obvious, don't you think so? Commented Feb 16, 2012 at 10:47
  • find any solutions? Commented Apr 9, 2012 at 10:39
  • Nope, not found yet. I doubt there's something like that. Commented May 13, 2012 at 10:53
1

I dont know of any such proxy, but if the intent is to check that all statements processed by server1 are valid on server2 also, then you should consider the tools like pgreplay, etc.

See http://wiki.postgresql.org/wiki/Statement_Playback

RolandoMySQLDBA
185k34 gold badges327 silver badges541 bronze badges
answered Mar 3, 2012 at 14:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.