Re: pg_recvlogical prints bogus error when interrupted
От | Bharath Rupireddy |
---|---|
Тема | Re: pg_recvlogical prints bogus error when interrupted |
Дата | |
Msg-id | CALj2ACXJCmtJjNm8KCAmXAA_yrtPaa-ot4GJg0UiyAcaE9jJdA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pg_recvlogical prints bogus error when interrupted (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
Ответы |
Re: pg_recvlogical prints bogus error when interrupted
|
Список | pgsql-hackers |
On Wed, Jul 19, 2023 at 12:07 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > 4. With v5, it was taking a while to exit after the first CTRL+C, see > multiple CTRL+Cs at the end: > ubuntu::~/postgres/inst/bin$ ./pg_recvlogical --slot=lsub1_repl_slot > --file=lsub1.data --start --verbose > pg_recvlogical: starting log streaming at 0/0 (slot lsub1_repl_slot) > pg_recvlogical: streaming initiated > pg_recvlogical: confirming write up to 0/0, flush to 0/0 (slot lsub1_repl_slot) > pg_recvlogical: confirming write up to 0/2BFFFD0, flush to 0/2BFFFD0 > (slot lsub1_repl_slot) > pg_recvlogical: confirming write up to 0/2BFFFD0, flush to 0/2BFFFD0 > (slot lsub1_repl_slot) > pg_recvlogical: confirming write up to 0/2BFFFD0, flush to 0/2BFFFD0 > (slot lsub1_repl_slot) > ^Cpg_recvlogical: end position 0/2867D70 reached on signal > ^C^C^C^C^C^C^C^C^C^C^C^C > ^C^C^C^C^C^C^C^C^C^C^C^C I think the delay is expected for the reason specified below and is not because of any of the changes in v5. As far as CTRL+C is concerned, it is a clean exit and hence we can't escape the while(1) loop. /* * We're doing a client-initiated clean exit and have sent CopyDone to * the server. Drain any messages, so we don't miss a last-minute * ErrorResponse. The walsender stops generating XLogData records once * it sees CopyDone, so expect this to finish quickly. After CopyDone, * it's too late for sendFeedback(), even if this were to take a long * time. Hence, use synchronous-mode PQgetCopyData(). */ while (1) { -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: