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 1k5Pig-0006Eo-L9 for pgsql-admin@arkaria.postgresql.org; Tue, 11 Aug 2020 08:33:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k5Pif-0004MK-2h for pgsql-admin@arkaria.postgresql.org; Tue, 11 Aug 2020 08:33:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5Pie-0004Kl-MW for pgsql-admin@lists.postgresql.org; Tue, 11 Aug 2020 08:33:16 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k5PiY-00045V-29 for pgsql-admin@lists.postgresql.org; Tue, 11 Aug 2020 08:33:15 +0000 Received: by mail-ed1-x543.google.com with SMTP id i6so8433281edy.5 for ; Tue, 11 Aug 2020 01:33:09 -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=b8NnuBNGp493y7Bs8nzf5r86Zf3oPX4xfj3E3/b/pww=; b=kITk5yC7cn7Q0nSduhPsVU3ibAZmYOMp6wvk2QXFJrJG6Ftf8nbRRnhjjrwfLKy2QX PMlVzNWtYtq4nNcvaBYF2yqXglCHlEBfKnyVQTzXSLqAUigy7zj8Y1jZOH8rlra+VQ6+ vsWGrJNo4inkmhEs1zOJaCAfSj3ZsU2HaMj46Uvbo8yKHzlkyr6GpSSRlB5+4D09MXnG wzkt7UhZwuq9gIfOpU0szmYSfuJ+GBsusHU5MlgrXsYetSpTTFrjJDRSMUfHLDTgPGw0 LQB1gwKylQkHSLGLGivBlnv/iXPfP0aVMukEy/xZ6ag241eZnnhJoFxPeWCH5+O1h0AZ xh2A== 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=b8NnuBNGp493y7Bs8nzf5r86Zf3oPX4xfj3E3/b/pww=; b=gf0kQhWq16gzFdxQXFptJ4r60+QwQ4CNle/yB6Ap3ZvpJRL0ccsyxxwJY4nhG/fqsv u/oj8CQSAUVzWogWlFsge3cbRYxMwwj9qRWyEfn6G4+fdqI5ixRZqzO6hPLQI9SYDDg9 Re8yA423+NHus5M3htzKAnbBEcyy/Y1T70X9slJO6xtrw7EZj8ftQe15cqeJVmHpbnI4 beu1nOhNTs9jNXRCWdqt+M4Uybc5AzcvhMJZokt8WkpCn8HgDSZZGzyh/VvkKFBMWW2e du07htX4qsZLcNLPbHvgBQaxkQPxGZf3NLqv80P/42atBEko6lgLlMn/U1bx3oGEIICp jYrg== X-Gm-Message-State: AOAM5332tdqGKfHRBaN1OBXDj1aE9gNc632WNuO9EqaPrEM5awl9k2H9 gQl04eNhY/irhN6yXoHlU0aLpA== X-Google-Smtp-Source: ABdhPJwVmnoCLToWMVNrCkLIN9u5XQXObM0/f2EqiLiynqAbqykoVGaTqo3v6IFVwHRJ+0VAPyvB2A== X-Received: by 2002:aa7:cc06:: with SMTP id q6mr25162926edt.10.1597134787197; Tue, 11 Aug 2020 01:33:07 -0700 (PDT) Received: from localhost.localdomain (217-149-170-169.nat.highway.telekom.at. [217.149.170.169]) by smtp.gmail.com with ESMTPSA id g24sm13967343eds.42.2020.08.11.01.33.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2020 01:33:06 -0700 (PDT) Message-ID: Subject: Re: PostgreSQL JDBC Driver ERROR: invalid byte sequence for encoding "UTF8": 0x00 on Select stmt From: Laurenz Albe To: Hotmail , Pgsql-admin Date: Tue, 11 Aug 2020 10:33:05 +0200 In-Reply-To: References: <33086f4b-dacc-466e-a085-830b62cdd18a@Spark> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4 (3.36.4-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, 2020-08-08 at 03:59 -0600, Hotmail wrote: > We migrated data from Oracle to postgres using oracle_fdw without seeing any invalid byte > sequence for encoding "UTF8": 0x00 errors. The data transfer from Oracle to Postgres using > oracle_fdw completed successfully without any errors. > > After we started our application using Postgres as the new data source we are consistently > seeing "invalid byte sequence for encoding "UTF8": 0x00 errors" once or twice a minute on > a basic select statement like this: > > Select * from where =‘foo’ and =‘foo2’; > > Not all queries fail just some. We can select * from the table in question from psql without > any invalid byte sequence errors (A problem with the jdbc client maybe?) oracle_fdw will complain about zero bytes, so odds are that your PostgreSQL database is fine. This is confirmed by the face that "SELECT * FROM atable" works in PostgreSQL. I can see two options: 1. The statement that causes the errors is actually a different statement, for example an INSERT. 2. 'foo' and 'foo2' contain zero bytes. Yours, Laurenz Albe