postgres/contrib/postgres_fdw
Robert Haas 96198d94cb Avoid multiple foreign server connections when all use same user mapping.
Previously, postgres_fdw's connection cache was keyed by user OID and
server OID, but this can lead to multiple connections when it's not
really necessary.  In particular, if all relevant users are mapped to
the public user mapping, then their connection options are certainly
the same, so one connection can be used for all of them.

While we're cleaning things up here, drop the "server" argument to
GetConnection(), which isn't really needed.  This saves a few cycles
because callers no longer have to look this up; the function itself
does, but only when establishing a new connection, not when reusing
an existing one.

Ashutosh Bapat, with a few small changes by me.
2016-01-28 12:05:19 -05:00
..
expected postgres_fdw: Consider requesting sorted data so we can do a merge join. 2015-12-22 13:46:40 -05:00
sql postgres_fdw: Consider requesting sorted data so we can do a merge join. 2015-12-22 13:46:40 -05:00
.gitignore
connection.c Avoid multiple foreign server connections when all use same user mapping. 2016-01-28 12:05:19 -05:00
deparse.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
Makefile Allow postgres_fdw to ship extension funcs/operators for remote execution. 2015-11-03 18:42:18 -05:00
option.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
postgres_fdw--1.0.sql
postgres_fdw.c Avoid multiple foreign server connections when all use same user mapping. 2016-01-28 12:05:19 -05:00
postgres_fdw.control
postgres_fdw.h Avoid multiple foreign server connections when all use same user mapping. 2016-01-28 12:05:19 -05:00
shippable.c Update copyright for 2016 2016-01-02 13:33:40 -05:00