Infinite loop in pgbench when running COPY command - Mailing list pgsql-hackers

From Anthonin Bonnefoy
Subject Infinite loop in pgbench when running COPY command
Date
Msg-id CAO6_XqpHyF2m73ifV5a=5jhXxH2chk=XrgefY+eWWPe2Eft3=A@mail.gmail.com
Whole thread Raw
Responses Re: Infinite loop in pgbench when running COPY command
List pgsql-hackers
Hi,

Currently, pgbench processes a copy response as unexpected and will
move to the error loop. However, PQgetResult will alway return an
empty result when there's no async result through getCopyResult,
leading to an infinite loop in the error handling as res will never be
NULL.

This patch forcefully exits the copy state with PQendcopy before
moving to the error handler, avoiding the infinite loop.

Regards,
Anthonin Bonnefoy

Attachment

pgsql-hackers by date:

Previous
From: torikoshia
Date:
Subject: Re: RFC: Logging plan of the running query
Next
From: jian he
Date:
Subject: Re: CREATE TABLE LIKE INCLUDING TRIGGERS