From: za-arthur (@za-arthur) <noreply+za-arthur@github.com>
To: reorg/pg_repack <noreply+reorg-pg_repack@github.com>
Subject: [reorg/pg_repack] issue #356: simple_prompt() hangs because SIGINT handler was overridden
Date: Wed, 07 Jun 2023 12:29:45 +0000
Message-ID: <gh-reorg-pg_repack-356@github.com> (raw)
pg_repack overrides SIGINT handler:
https://github.com/reorg/pg_repack/blob/81f26d10e5e5b0c3fb7afbd5d91f3a6f3dfafd87/bin/pgut/pgut.c#L16...
Because of this it isn't possible to interrupt password prompt with CTRL+C. You need to interrupt it you need to enter some or empty password.
If you do the following steps then pg_repack crashes:
- Run pg_repack
- Press CTRL+C when pg_repack waits for a password
- Enter any password
```
pg_repack -t repack_table -d postgres -U repack_user
Password:
FATAL: interrupted
[1] 36015 IOT instruction (core dumped) pg_repack -t repack_table -d postgres -U repack_user
```