RE: [HACKERS] Client Connection redirection support for PostgreSQL

From: Satyanarayana Narlapuram <Satyanarayana(dot)Narlapuram(at)microsoft(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL-development<pgsql-hackers(at)postgresql(dot)org>
Subject: RE: [HACKERS] Client Connection redirection support for PostgreSQL
Date: 2018-03-05 20:18:38
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

Please see the attached patch with the comments.

Changes in the patch:
A client-side PGREDIRECTLIMIT parameter has been introduced to control the maximum number of retries.
BE_v3.1 sends a ProtocolNegotiation message. FE_v3.1 downgrades to v3.0 upon receipt of this message.
FE falls back to v3.0 if 3.1 is not supported by the server.

>> I hadn't really thought deeply about whether redirection should happen before or after authentication. For the most part, before seems better, because it seems a bit silly to force people to authenticate just so that you can tell them to go someplace else. Also, that would lead to double authentication, which might for example result in multiple password prompts, which users might either dislike or find confusing.

Yes, redirection before authentication would avoid multiple password prompts.


Attachment Content-Type Size
redirection_v2.patch application/octet-stream 22.1 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-03-05 20:25:09 Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs
Previous Message Andres Freund 2018-03-05 20:17:30 Re: JIT compiling with LLVM v11