Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDkV7-00031Q-Br for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 07:49:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDkV5-0002rO-PE for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 07:49:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDkV5-0002r9-6g for pgsql-general@lists.postgresql.org; Mon, 16 Mar 2020 07:49:27 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jDkV1-00069E-F7 for pgsql-general@lists.postgresql.org; Mon, 16 Mar 2020 07:49:25 +0000 Received: by mail-wr1-x433.google.com with SMTP id t2so9788500wrx.12 for ; Mon, 16 Mar 2020 00:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=I13Y/hs+qxIk/JIdAW3JaoA1U4G8WfR7hrLpA6tzreY=; b=TWm2vAcIg2ykmUYq70dYuqZzHU+d5POwSQ1uerz2GrOOjUpIkQKP+BszR+mWPemsfP h+htQVc/vBbrfzQwpZ4aSaX10d1hVwsPB8+RSIcJkDTYzORYtGA43821YNqXhHcciin6 656uBQvav5OTD090cr1vDgNGren1wtEpnS2061LVTUSJHPIcuE5xKcc03lAnUmueZKgl aJ9FgFZ3hv0E1U21chx+z9kGUvaYqyqh/ASonfuFp/7hPiNv/F4jNf4DJB7kROM3pAS7 AL+bHBSXvXtC5odi2ExhxLFp3oM7Y25gMvAKQ93AnBNsPc5YrtLjCo15xhRz0ipSQSEU 2vXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=I13Y/hs+qxIk/JIdAW3JaoA1U4G8WfR7hrLpA6tzreY=; b=EiuWr77tPay+l2t5bT2t7vaxBifdjpX8ZVXS3plhUoXKOzuBVfC6ufbQlC5/108ErT 0CEXuMwp18Sh44uckU5Gn1jL7WrFiQPFk+dsHGfkGxba//4oNK3L7eQ+U51ZaTj5A4JI DfF59+qPKmAZuepPoqqSWiSPzR3DdRkDZth3PImzTOna6fT/TrHWGekfdp+1eYaUdIrG TmhNe90ZeJCmlHOTU6kb45lyb49dz5XhieNAGZps/qoDsSe+jLxCrCBNJPg/ed4XSH1t N+/bddMfuWhhxmMdnXOvDaPy/xS74Vo/EiNyRl2S77oVI1bIT75Bs2I2HQJ7VVWXuwgm YFbw== X-Gm-Message-State: ANhLgQ0jo0Sz8aeyLHd9sW7IxAkv1+JEkha1IaNnb+9CFBZ1lu1Qlofu o+21kWtzO1Ya5TdmHEZ3AY6DMmMVfBc= X-Google-Smtp-Source: ADFU+vuHQvQkXlNQ5US+7C3GFcsJmPthIoedaXH61RuLB6oALj/Z2gZD+Gbsx3F6Sys6ryuzo9LT4w== X-Received: by 2002:a5d:5446:: with SMTP id w6mr35810458wrv.419.1584344959954; Mon, 16 Mar 2020 00:49:19 -0700 (PDT) Received: from localhost.localdomain (p50992f7c.dip0.t-ipconnect.de. [80.153.47.124]) by smtp.gmail.com with ESMTPSA id i9sm29408828wmd.37.2020.03.16.00.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 00:49:19 -0700 (PDT) Message-ID: Subject: Re: Invalid byte sequence errors on DB restore From: Laurenz Albe To: Samuel Smith , pgsql-general Date: Mon, 16 Mar 2020 08:49:18 +0100 In-Reply-To: <2c81203a-01ef-ca84-1294-91420f71dd1f@net153.net> References: <2c81203a-01ef-ca84-1294-91420f71dd1f@net153.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, 2020-03-15 at 23:18 -0500, Samuel Smith wrote: > My current DB backup routine is just to call pg_dump and pipe to gzip. > We recently started to get a failure to restore (which is basically just > using psql -f on the pg_dump file) with the following errors: > > invalid byte sequence for encoding "UTF8": 0xa0 > and > invalid byte sequence for encoding "UTF8": 0xd7 0x20 > > > This is on a pg 9.2.24 instance. Any tips to troubleshoot? Simple. Fix the offending string and upgrade. Failure to enforce correct encoding is a bug in PostgreSQL, and a number of such bugs have been fixed over the decades, so you might be happier with a less ancient version. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com