Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6xbf-0000qn-Gp for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 15:28:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6xbb-0000US-4F for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 15:28:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6xba-0000UL-Sq for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 15:28:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6xbY-0001ke-FI for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 15:28:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 112FSW2M3715070; Tue, 2 Feb 2021 10:28:33 -0500 From: Tom Lane To: =?UTF-8?B?SmnFmcOtIFBhdmxvdnNrw70=?= cc: rob stone , pgsql-general@lists.postgresql.org Subject: Re: libpq and mysterious "invalid byte sequence for encoding UTF8". In-reply-to: References: <8b88f867-d0d0-6deb-8f13-48853a57080a@pavlovsky.eu> <3335118.1612191322@sss.pgh.pa.us> <8c67bf16-e267-a40c-25da-ebc646d0753d@pavlovsky.eu> <23edd5119fad0d4fc358123a51a0158b05fabb8b.camel@gmail.com> <3597100.1612234425@sss.pgh.pa.us> Comments: In-reply-to =?UTF-8?B?SmnFmcOtIFBhdmxvdnNrw70=?= message dated "Tue, 02 Feb 2021 11:11:49 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3715068.1612279712.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 02 Feb 2021 10:28:32 -0500 Message-ID: <3715069.1612279712@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?UTF-8?B?SmnFmcOtIFBhdmxvdnNrw70=3D?=3D writes: > Client and server encoding is UTF8. Locales are set to C.UTF8. If lc_messages is C then no translation of error strings would happen, so that theory goes out the window. Oh well. Perhaps you could attach gdb to the backend and get a stack trace from the call to errfinish? https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_= backend regards, tom lane