citus/src/backend/distributed/worker
Andres Freund 3dae284bbe Use the current session's username when connecting to worker nodes.
So far we've always used libpq defaults when connecting to workers; bar
special environment variables being set that'll always be the user that
started the server.  That's not desirable because it prevents using
users with fewer privileges.

Thus change the various APIs creating connections to workers to always
use usernames. That means:
1) MultiClientConnect() needs to, optionally, accept a username
2) GetOrEstablishConnection(), including the underlying cache, need to
   use the current user as part of the connection cache key. That way
   connections for separate users are distinct, and we always use one
   with the correct authorization.
3) The task tracker needs to keep track of the username associated with
   a task, so it can use it when establishing connections outside the
   originating session.
2016-04-27 10:00:08 -07:00
..
task_tracker.c Use the current session's username when connecting to worker nodes. 2016-04-27 10:00:08 -07:00
task_tracker_protocol.c Use the current session's username when connecting to worker nodes. 2016-04-27 10:00:08 -07:00
worker_data_fetch_protocol.c Use the current session's username when connecting to worker nodes. 2016-04-27 10:00:08 -07:00
worker_file_access_protocol.c Update copyright dates 2016-03-23 17:14:37 -06:00
worker_merge_protocol.c Annotate variables only used for asserts with PG_USED_FOR_ASSERTS_ONLY. 2016-04-19 12:31:12 -06:00
worker_partition_protocol.c Include appropriate headers for htons() and htonl(). 2016-04-15 09:37:08 -07:00