[PATCH] Add CHECK_FOR_INTERRUPTS in scram_SaltedPassword loop.

From: Bowen Shi <zxwsbg12138(at)gmail(dot)com>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [PATCH] Add CHECK_FOR_INTERRUPTS in scram_SaltedPassword loop.
Date: 2023-11-22 11:47:04
Message-ID: CAM_vCueV6xfr08KczfaCEk5J_qeTZtgqN7+orkNLx=g+phE82Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, hackers

When the scram_iterations value is set too large, the backend would hang for
a long time. And we can't use Ctrl+C to cancel this query, cause the loop don't
process signal interrupts.

Add CHECK_FOR_INTERRUPTS within the loop of scram_SaltedPassword
to handle any signals received during this period may be a good choice.

I wrote a patch to solve this problem. What's your suggestions?

Dears
Bowen Shi

Attachment Content-Type Size
0001-Add-CHECK_FOR_INTERRUPTS-in-scram_SaltedPassword-loo.patch application/octet-stream 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2023-11-22 11:55:16 Re: pg_upgrade and logical replication
Previous Message Ashutosh Bapat 2023-11-22 11:30:33 Re: Changing baserel to foreignrel in postgres_fdw functions