Need help with plproxy?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

148 Stars 38 Forks Other 381 Commits 3 Opened issues


PL/Proxy development

Services available


Need anything else?

Contributors list


PL/Proxy is a PostgreSQL procedural language (PL) handler that allows to do remote procedure calls between PostgreSQL databases, with optional sharding.


Language has four statements:

  • Pick remote database:
    • CLUSTER 
      - use pre-configured cluster that has many databases
    • CONNECT 
      - use connstr directly
  • Set execution type:
    • RUN ON ALL
      - query is run on all databases in parallel
    • RUN ON ANY
      - pick server randomly
    • RUN ON 
      - map hash to database
  • Replace default query:
    • SELECT ...


CREATE FUNCTION get_user_settings(i_username text) RETURNS SETOF user_settings AS $$
    RUN ON namehash(i_username):
$$ LANGUAGE plproxy;

It will run function with same name in remote database and fetch



For installation there must be PostgreSQL dev environment installed and

in the PATH. Then just run:
$ make
$ make install

To run regression tests:

$ make installcheck

Location to

can be set via
$ make PG_CONFIG=/path/to/pg_config
$ make install PG_CONFIG=/path/to/pg_config
$ make installcheck PG_CONFIG=/path/to/pg_config

Note: Encoding regression test fails if the Postgres instance is not created with C locale. It can be considered expected failure then.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.