Two round for Client Authentication

Поиск
Список
Период
Сортировка
От Yinjie Lin
Тема Two round for Client Authentication
Дата
Msg-id CA+zFF0dy3Z8SA2f=ZghAiGT_DjK0eeG7H8xZegORxvbbxerH5Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Two round for Client Authentication  (Marko Tiikkaja <marko@joh.to>)
Re: Two round for Client Authentication  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
Hello everyone.

I am a newcomer to PostgreSQL, and I don't know if it is proper to post my question here, but I really need some help.

Currently I am reading and testing code about Client Authentication, but I find that there are two progresses forked if I login using psql, while only one progress is forked if using pgAdmin.

My pg_hba.conf is as follows:
local  all  all                               md5
host  all  all  192.168.64.56/32  md5

If I login with psql, the following stack is called twice:
    ServerLoop
    BackendStartup
    BackendRun
    PostgresMain
    InitPostgres
    PerformAuthentication
    ClientAuthentication

In the first round, the variable `status` in function ClientAuthentication() is always STATUS_EOF (at least in my test). In the second round, `status` seems to be what should be expected: STATUS_OK for correct password, STATUS_ERROR for wrong password, and STATUS_EOF for empty password.

Why are there two such progresses forked? I think one round should be enough, like when using pgAdmin.

Besides, I find it hard to debug the ServerLoop() stack, compared with the backend progress for query, because there are two many subprogresses and signals. It would be of great help if anyone could give me some instructions on how to learn to debug postmaster using gdb.

Thanks in advance!

Best Regards


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: WAL prefetch
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Partitioning with temp tables is broken