Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs2MM-004OvE-KI for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Apr 2024 15:17:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rs2ML-003k1t-Jc for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Apr 2024 15:17:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs2ML-003k1l-99 for pgsql-hackers@lists.postgresql.org; Wed, 03 Apr 2024 15:17:05 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rs2MI-000RQY-AW for pgsql-hackers@postgresql.org; Wed, 03 Apr 2024 15:17:04 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-229bd1776dcso2928676fac.0 for ; Wed, 03 Apr 2024 08:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon.tech; s=google; t=1712157420; x=1712762220; darn=postgresql.org; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7qDSNNRClssA5Dqj7lS0RGDkhN661z37Ec/+mLAgupk=; b=B1kKXMCUyNcfoRae8SFSQfoRZuZWdX1R8dkuVZMzddA3ZLOfLJaLt673hEIGnPQspK rIQ7B6J464JQyzYjlIlYnngKogRx5b792817/iJOXIxvX4Y2Hiq7QnLujL3QdmvSMEis 3QgaKXBJo1Kks09v86SnYV4c6hLGkt6eyISNU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712157420; x=1712762220; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=7qDSNNRClssA5Dqj7lS0RGDkhN661z37Ec/+mLAgupk=; b=w1ieGIvAnnlqVOk5DapQC02E1OMrdO1wtIDFHVrmEA7k6gUnouHAtBGMFkd0ijI4RM uRV4RYUWeENKQQIEI8q8JvImCBPV8asPGWED2/xw/4WZ/7jHPCQLERvOTai1RsfDjk4i i8piKydhB1KWEyYKbb5y+REHrUcPbTjWKgs8ob2Mj/uNtGC5DWu7Wl5PxvJLdzdBRZmx 8iiCCBM2ENYd8EzKHl3wc/8LjrAG46fDXsWfMDJGfYFK9cGDR17PwRwwgusVJgQTOW0Y oKF6C7MH2oXG5MrWBi0QO1PHDq2+rWMN3y/S0mkx9q2yREbTGjwzv8eG7nZzkYPWR68u ojmQ== X-Forwarded-Encrypted: i=1; AJvYcCW7De+uI5ltQb0hmZnduZI4vgHShyVBRTdTFe+vFtXq/6umxcEvl6zwW/90ZDOrO6YqfUowv2EhWvOlZYupa543tk8oSVufjziozb+z X-Gm-Message-State: AOJu0Yw8ZR80Oqi+CDsXG+Pw0x4aUoTqK5R1ofU3/2RfuzipFumftRbj pcnpSLCyMGRx/2k0FMbPZ571oXMsr4jg6258ba4OBagRjh9B5km0GIp8oyBhlwA= X-Google-Smtp-Source: AGHT+IG/Du6wLSPj3G9lSLpvJDNrxpcXg0EbwOKeE0AgK/u7MhTYRJ6a5ZXlC5NdxZ6IZDMjE3QUGA== X-Received: by 2002:a05:6870:ad97:b0:219:23ed:8c5f with SMTP id ut23-20020a056870ad9700b0021923ed8c5fmr18137119oab.54.1712157420256; Wed, 03 Apr 2024 08:17:00 -0700 (PDT) Received: from localhost ([2607:fb90:f22d:7a0:3996:e070:71ee:42fb]) by smtp.gmail.com with ESMTPSA id pd6-20020a0568701f0600b0022275702b8asm3975980oab.44.2024.04.03.08.16.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Apr 2024 08:16:59 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Wed, 03 Apr 2024 10:16:58 -0500 Message-Id: Cc: "Robert Haas" , "Heikki Linnakangas" , , "Shlok Kyal" Subject: Re: psql not responding to SIGINT upon db reconnection To: "Jelte Fennema-Nio" From: "Tristan Partin" X-Mailer: aerc 0.17.0-89-g28fde6118fca References: <1588058.1690220636@sss.pgh.pa.us> <5e28b89f-0033-4e42-8184-b71b731c1aa2@iki.fi> <9b3693b7-0bc3-430a-b43f-eae44e8a39b6@iki.fi> <032868e0-a530-4fc7-972c-af6f08950b7e@iki.fi> <2049574.1712154700@sss.pgh.pa.us> In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed Apr 3, 2024 at 10:05 AM CDT, Jelte Fennema-Nio wrote: > On Wed, 3 Apr 2024 at 16:55, Tristan Partin wrote: > > Removing from the switch statement causes a warning: > > > > > [1/2] Compiling C object src/bin/psql/psql.p/command.c.o > > > ../src/bin/psql/command.c: In function =E2=80=98wait_until_connected= =E2=80=99: > > > ../src/bin/psql/command.c:3803:17: warning: enumeration value =E2=80= =98PGRES_POLLING_ACTIVE=E2=80=99 not handled in switch [-Wswitch] > > > 3803 | switch (PQconnectPoll(conn)) > > > | ^~~~~~ > > > Ofcourse... fixed now I think patch 2 makes it worse. The value in -Wswitch is that when new=20 enum variants are added, the developer knows the locations to update.=20 Adding a default case makes -Wswitch pointless. Patch 1 is still good. The comment change in patch 2 is good too! --=20 Tristan Partin Neon (https://neon.tech)