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 1tPxkI-00Gekj-FB for pgsql-general@arkaria.postgresql.org; Tue, 24 Dec 2024 05:46:19 +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 1tPxkH-0020D2-MY for pgsql-general@arkaria.postgresql.org; Tue, 24 Dec 2024 05:46:17 +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 1tPxkH-0020BP-6C for pgsql-general@lists.postgresql.org; Tue, 24 Dec 2024 05:46:17 +0000 Received: from forward101d.mail.yandex.net ([178.154.239.212]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tPxkD-001LCa-H2 for pgsql-general@lists.postgresql.org; Tue, 24 Dec 2024 05:46:16 +0000 Received: from mail-nwsmtp-smtp-production-main-24.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-24.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7c8d:0:640:44ed:0]) by forward101d.mail.yandex.net (Yandex) with ESMTPS id 4644660A10 for ; Tue, 24 Dec 2024 08:46:12 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-24.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 7kPGtPsOceA0-LCfSusJV; Tue, 24 Dec 2024 08:46:11 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1735019171; bh=+RJtYpjjw0OiPB7jb/PUE6j2CcbPdmXjX3kogXvcPs0=; h=To:Subject:From:Date:Message-ID; b=N4pdJVjR0tXhsToqRmf7RFS4G3M57can3loqe44tPEu2Zi0g/acKqMQA0lg+7qT2M rRT9COIrBIe54K4vmgPhHaesWuywq9uFUHEN3rHbVX1+46LsbFEK7LHEkLyOH8lJXr 9r+VJKcNBlRaurmtqgbVn725x3s26hL5p0mQUyQE= Authentication-Results: mail-nwsmtp-smtp-production-main-24.iva.yp-c.yandex.net; dkim=pass header.i=@ya.ru Message-ID: Date: Tue, 24 Dec 2024 08:46:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Olleg Samoylov Subject: "trailing junk after numeric literal at or near ""512""" To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all. I have PostgreSQL 16.6. The log files are attached as partitions by file_fdw to the SQL table. Common practice. But after the error message "trailing junk after numeric literal at or near ""512""" (vim -b view) was wrote, the reading all log was stopped with error from file_fdw: ERROR: invalid byte sequence for encoding "UTF8": 0xd0 0x22 The reason is the error message in the log file (which must be utf-8) consist of: \x 22 35 31 32 d0 22 " 5 1 2 " and d0 is not a utf-8 character so it block reading whole log file by file_fdw. I think the correct behavior must be the error log function must mask the wrong bytes by the ESC sequences, so PostgreSQL will be able read such log file with help of file_fdw. -- Olleg