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 1vGGXo-00B6WB-K7 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2025 12:53:52 +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 1vGGXm-00DkcO-BZ for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2025 12:53:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vGGXl-00DkcE-TY for pgsql-hackers@lists.postgresql.org; Tue, 04 Nov 2025 12:53:49 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vGGXi-005PBY-0a for pgsql-hackers@lists.postgresql.org; Tue, 04 Nov 2025 12:53:47 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-640aaa89697so4180174a12.3 for ; Tue, 04 Nov 2025 04:53:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1762260823; x=1762865623; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=H5ja+bKzRkSU7Le20wt/7T2CrjcdA2fy+RQBJsf3duI=; b=h/hVQ1mOc33/JaiULGbGvf79PuRhLB7BcX5q0EpF7E0P4HdtwYwe0ZRNmYKK7jOHe5 Kl6ivmy2emQ6R1MOzG7k1jTKkXYDt8vNIjB2hlWUEL0tSaljhv3UnBC+BTO7p1sBg+3V PqBflzqC/yvBKuA0xOFQSUZ+DEEwhYfSYjoZ541ALRNmxpFxa+yZcXkr+QOVE/xdko1x XoGHfXgCx1vkZCoo2b9LbrqmEiX1WofeJD/Ba3hD0qLjuUq1LWpTE8hSzZkTmR+kFIHh CkTcZ28nIxsYmd9t3JkYEW9lrn0Fy+Lr8IxFNd/dS8A/aga2q6RQW/12dpLTQZtFL9I3 x0YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762260823; x=1762865623; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=H5ja+bKzRkSU7Le20wt/7T2CrjcdA2fy+RQBJsf3duI=; b=JDalhgRWqlyUx4GWJ3WG0u3j/VgxzjMQVDrXHZKzZ0NxD7PYEdYdvgsE0XdTDdCjVn BDGBCF5n1Vv/GNnnS55hVU+tu0WntqbaD8OHv+Ewa9ORt0eowqHGVTo251QAWAbiGRZt 9UaV0RmP1GQpAjt74p12+nWYBDsuuEmNtjj1r3w0V63WC2MrCTgUCVwB7MhowtXR7EBI juAS3qJ0efP71RqkfhXQ5LiqvLa8Tr66WnVAQw7KVWbTRI27jDXZv/UfMf80cIyoVHQ1 10UON8S5XBPpbGfPcOxiBw5VRqVID7XzPvMXI5bWIXk7ht/y38ffwCC2apHwR3xrWRd6 2XJg== X-Forwarded-Encrypted: i=1; AJvYcCVIV5UoFkZrKjxY0u+f2lH8tHhUzxEmZqGSH+JeAY05/LBrgKaFtNACDXmucMtvKbWgnDXo8X1Y3WIKCvFg@lists.postgresql.org X-Gm-Message-State: AOJu0YzRNTYMDQvOjU9Oe7ZBvehBiak7KmfBAu4teilxg52Jaup/MYq2 6HxZepBkAwMeteG084D1/0wod3lZgsoIzBu4IpHj6OtoPXW26EJwHDTtY2yd8m58IRQQS/WmMBQ pW0hx2WndG/x46LJysEbJkOjFc8uY32ORQzp8Ld77 X-Gm-Gg: ASbGncsG9pl3tn8Z0tWor/MPNSHZ/nWopFvdzJGdY10QcjiwfSZPJnJ+9pyUhR9Np1V IAotf3oEgAAOS4VcWyFlvBm/qnGITWbCYldu8Bbd/LnNKIuu1Re/WY0WDoaICvxnrIVaK6QvPp4 QNsWPDUNqLGKQIuHJT0/IAtrsfBq8OErucf88+APpd20K3c8ANNbq9Tnv0yd9AOqiB0gVez95nM ygMNLn1rKZEWA7BHpMGNg67ZSFbNKbQdGtkQNPCpDc68zj28w3b+DfFn099cKE= X-Google-Smtp-Source: AGHT+IGSP/ZxJ+RSoaUMIZx+kEF4Igf1c210p+5ik0B9r2T6YyIS/ob8614vMjFgjhHQawKAluQwtb1+DHas+uvHjdM= X-Received: by 2002:a17:906:fb11:b0:b70:b1e1:8294 with SMTP id a640c23a62f3a-b70b1e1acb5mr641821966b.4.1762260822926; Tue, 04 Nov 2025 04:53:42 -0800 (PST) MIME-Version: 1.0 References: <3f22a8bb-29e8-40cc-97a1-309181da2c13@dunslane.net> <20250722005339.ca.nmisch@google.com> <20250725162141.6f.nmisch@google.com> <2225040.1753477169@sss.pgh.pa.us> <20250727235628.e2.nmisch@google.com> <8f2ad50b-ebb7-4adc-997e-25e0ad96ff34@dunslane.net> <2bed001a-462c-42da-9a6b-3c7884502932@dunslane.net> <20250824010811.4d.nmisch@google.com> <82eb35b8-7f07-493b-b689-0934919e1dc3@dunslane.net> In-Reply-To: From: tushar Date: Tue, 4 Nov 2025 18:23:30 +0530 X-Gm-Features: AWmQ_bmiBMSzmUscigw8ZukOuLRB4t1crpDNRUjOeWRN8PV_g_OaOMzosiaeL6w Message-ID: Subject: Re: Non-text mode for pg_dumpall To: Mahendra Singh Thalor Cc: Vaibhav Dalvi , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000005a43bf0642c45241" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005a43bf0642c45241 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 3, 2025 at 5:25=E2=80=AFPM Mahendra Singh Thalor wrote: > On Mon, 3 Nov 2025 at 12:06, Vaibhav Dalvi > wrote: > > > > Hi Mahendra, > > > > Thank you for your work on this feature. > > I have just begun reviewing the latest patch and > > encountered the following errors during the initial setup: > > > > ``` > > $ ./db/bin/pg_restore testdump_dir -C -d postgres -F d -p 5556 > > pg_restore: error: could not execute query: ERROR: syntax error at or > near "\\" > > LINE 1: \restrict aO9K1gzVZTlafidF5fWx8ADGzUnIiAcguFz5qskGaFDygTCjCj... > > ^ > > Command was: \restrict > aO9K1gzVZTlafidF5fWx8ADGzUnIiAcguFz5qskGaFDygTCjCj9vg3Xxys1b3hb > > > > pg_restore: error: could not execute query: ERROR: syntax error at or > near "\\" > > LINE 1: \unrestrict aO9K1gzVZTlafidF5fWx8ADGzUnIiAcguFz5qskGaFDygTCj... > > ^ > > Command was: \unrestrict > aO9K1gzVZTlafidF5fWx8ADGzUnIiAcguFz5qskGaFDygTCjCj9vg3Xxys1b3hb > > > > pg_restore: error: could not execute query: ERROR: syntax error at or > near "\\" > > LINE 1: \connect template1 > > ^ > > Command was: \connect template1 > > > > pg_restore: error: could not execute query: ERROR: syntax error at or > near "\\" > > LINE 1: \connect postgres > > ^ > > Command was: \connect postgres > > ``` > > To cross-check tried with plain dump(with pg_dumpall) and > > restored(SQL file restore) without patch and didn't get above > > connection errors. > > > > It appears there might be an issue with the dump file itself. > > Please note that this is my first observation as I have just > > started the review. I will continue with my assessment. > > > > Regards, > > Vaibhav Dalvi > > EnterpriseDB > > Thanks Vaibhav for the review. > This change was added by me in v04. Only in the case of a file, we should > restore these commands. Attached patch is fixing the same. > > Thanks Mahendra, I am getting a segmentation fault against v05 patch. [edb@1a1c15437e7c bin]$ ./pg_dumpall -Ft --file a.3 -v pg_dumpall: executing SELECT pg_catalog.set_config('search_path', '', false); Segmentation fault Issue is coming with all output file formats -F[t/c/d] except plain regards, --0000000000005a43bf0642c45241 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Nov 3, = 2025 at 5:25=E2=80=AFPM Mahendra Singh Thalor <mahi6run@gmail.com> wrote:
On Mon, 3 Nov 2025 at 12:= 06, Vaibhav Dalvi <vaibhav.dalvi@enterprisedb.com> wrote:
>
>= ; Hi Mahendra,
>
> Thank you for your work on this feature.
= > I have just begun reviewing the latest patch and
> encountered t= he following errors during the initial setup:
>
> ```
> $= ./db/bin/pg_restore testdump_dir -C -d postgres -F d -p 5556
> pg_re= store: error: could not execute query: ERROR: syntax error at or near "= ;\\"
> LINE 1: \restrict aO9K1gzVZTlafidF5fWx8ADGzUnIiAcguFz5qsk= GaFDygTCjCj...
> ^
> Command was: \restrict aO9K1gzVZTlafidF5fW= x8ADGzUnIiAcguFz5qskGaFDygTCjCj9vg3Xxys1b3hb
>
> pg_restore: er= ror: could not execute query: ERROR: syntax error at or near "\\"=
> LINE 1: \unrestrict aO9K1gzVZTlafidF5fWx8ADGzUnIiAcguFz5qskGaFDygT= Cj...
> ^
> Command was: \unrestrict aO9K1gzVZTlafidF5fWx8ADGzU= nIiAcguFz5qskGaFDygTCjCj9vg3Xxys1b3hb
>
> pg_restore: error: co= uld not execute query: ERROR: syntax error at or near "\\"
>= ; LINE 1: \connect template1
> ^
> Command was: \connect templa= te1
>
> pg_restore: error: could not execute query: ERROR: synt= ax error at or near "\\"
> LINE 1: \connect postgres
>= ; ^
> Command was: \connect postgres
> ```
> To cross-che= ck tried with plain dump(with pg_dumpall) and
> =C2=A0restored(SQL fi= le restore) without patch and didn't get above
> connection error= s.
>
> It appears there might be an issue with the dump file it= self.
> Please note that this is my first observation as I have just<= br>> started the review. I will continue with my assessment.
>
= > Regards,
> Vaibhav Dalvi
> EnterpriseDB

Thanks Vaib= hav for the review.
This change was added by me in v04. Only in the case= of a file, we should restore these commands. Attached patch is fixing the = same.

Thanks Mahendra, I am getting a segmen= tation fault against v05 patch.

[edb@1a1c15437e7c = bin]$ ./pg_dumpall -Ft =C2=A0 --file =C2=A0a.3 -v
pg_dumpall: executing= SELECT pg_catalog.set_config('search_path', '', false);Segmentation fault

Issue is coming with all outpu= t file formats -F[t/c/d] except plain=C2=A0

regard= s,
--0000000000005a43bf0642c45241--