Re: [PATCH] Align GSS and TLS error handling in PQconnectPoll()

Поиск
Список
Период
Сортировка
От Jacob Champion
Тема Re: [PATCH] Align GSS and TLS error handling in PQconnectPoll()
Дата
Msg-id CAAWbhmixS=QagV6NgCSj4DJrWosETr8T5o+H2+f3cBdTfMwc9g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Align GSS and TLS error handling in PQconnectPoll()  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: [PATCH] Align GSS and TLS error handling in PQconnectPoll()
Список pgsql-hackers
On Thu, Feb 16, 2023 at 10:59 PM Michael Paquier <michael@paquier.xyz> wrote:
> I am adding Stephen Frost
> in CC to see if he has any comments about all this part of the logic
> with gssencmode.

Sounds good.

> I agree that
> PQconnectPoll() has grown beyond the point of making it easy to
> maintain.  I am wondering which approach we could take when it comes
> to simplify something like that.  Attempting to reduce the number of
> flags stored in PGconn would be one.  The second may be to split the
> internal logic into more functions, for each state we are going
> through?  The first may lead to an even cleaner logic for the second
> point.

Yeah, a mixture of both might be helpful -- the first to reduce the
inputs to the state machine; the second to reduce interdependencies
between cases, the distance of the potential goto jumps, and the
number of state machine outputs. (When cases are heavily dependent on
each other, probably best to handle them in the same function?)
Luckily it looks like the current machine is usually linear.

Thanks,
--Jacob



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: psql: Add role's membership options to the \du+ command
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Move defaults toward ICU in 16?