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 1tsG9Y-00HBsC-SD for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 07:05:20 +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 1tsG8Z-00Fs9c-Iz for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Mar 2025 07:04:19 +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 1tsG8Z-00Fs9B-8o for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 07:04:19 +0000 Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tsG8V-002OAh-2H for pgsql-hackers@lists.postgresql.org; Wed, 12 Mar 2025 07:04:18 +0000 Received: by mail-ua1-x92f.google.com with SMTP id a1e0cc1a2514c-86112ab1ad4so2512013241.1 for ; Wed, 12 Mar 2025 00:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741763055; x=1742367855; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=I84okb+KxWXHChRjEmusQNB3VS8GHIYOgX9umJmvjHM=; b=ftZnc1CW2AbVM3Fi9z7qHnSA1Rd9Gp5PUnRAi+UVXoJQHmgZ2CSr8ZPPwPxzBFL6wW wPnG5tUuI1CnjPO17qgyhR6QJsggpsMHD3OYBkvWRWotcMk1j3gq7E050revP7KeqIfP zsfurAslbXuXng0mWU9EnoJHlFXb5wlAxpGrWzDucZwtgfA541gR5brGOlc01Agdg0NB NeiEKUVsr0Jo6KV9jWrqMoCXOeHuJJqImc2S2F9Zaknce/ylgmlR3hRJAQER+UysPbbT zxRyYdtmOGcFa0VoYPedvj/3mZo7xWsEYtSJMKB0uFozm3Yn2tKg0bqG8W3UOpGKiw56 iFNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741763055; x=1742367855; h=content-transfer-encoding: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=I84okb+KxWXHChRjEmusQNB3VS8GHIYOgX9umJmvjHM=; b=cChWBObkbU/CvaQU+5Z4pheFSjCXYIBhX/HcWrSx6reT9WZWPWmNndrmGAArLtxhQo KBOL4IW94i52TOOEiJicGfLAm2eHc42OJJo5dAqnP3tguKS0onc5EwQVxDpEEa54Y1y8 SFMPNowS5W97P0tF/SiC7qB8U2vMDnRPJ9AlHkEV2GbY6Oj00X8ZCEJNrSRv2lsEzbS2 PKm+EteoxZIaGynOGa8riex6Hwzmghsjws4m1I0dX//rnUezC9CrRyv0TxBUSsU7wbLT uc3ur2bKbR7RuM20Hja/NQQzjLVITuzO0we54PSFWFyKJPp9urlBCnFXLLV1LOzHQ07Q 0Y6g== X-Forwarded-Encrypted: i=1; AJvYcCU5xKc+hfkm9W2B/vWYYfSYO8TTDCOiZDW//+wUmdOp0HB6gBFMjiKviiRqgUXAxTJM91642MBCz9em6e0W@lists.postgresql.org X-Gm-Message-State: AOJu0YydLFk7u2WUfemszHpAR6/0Z2J+7WnlTaDgYO2M87wyYBRGADrO SngtCaJEfgR8KaLxRVGpAmnBq0FX2CpDr7AjClVOQ6yM59fw7jPRYQ7ACbUM1xE5VHoeRAbDh1N TezG4NHcrymBiatyQRBorCk0CnAk= X-Gm-Gg: ASbGncuGKRNvOFDPbouvoD6J2qkOUdYPy29PWA1SckrQlpodGTC3QhaMe3JHk1lnF7+ 3gZa2vHPpr8y4GzgLIetJl6VGPD5CTVoKlnDPz9KnxGwjr2d4Vhjmuxfrw1Z9fSoPNrFuC4rsHI eH3qLc4VilI7N1CDd8z8Oixcun8J4tgqRMJMlLQ6BmfZ3m9BQurXsPFxfa X-Google-Smtp-Source: AGHT+IFclzpdiFvcNXYFL9eN08gJJ37+vx/ClCjIbrPjlSOqKKwlcchOalIBRenKPGWSbNOxiXgh3GZqAH88wY3mk1A= X-Received: by 2002:a67:e710:0:b0:4c3:b0:46fd with SMTP id ada2fe7eead31-4c30a729b45mr14303092137.24.1741763055165; Wed, 12 Mar 2025 00:04:15 -0700 (PDT) MIME-Version: 1.0 References: <202503111705.xy7fddu36qae@alvherre.pgsql> In-Reply-To: <202503111705.xy7fddu36qae@alvherre.pgsql> From: jian he Date: Wed, 12 Mar 2025 15:03:37 +0800 X-Gm-Features: AQ5f1JqpAnOpKSWi3LVnGa_yfl3epGNuOiuT_uGaY5I_igrY9NgyTv9F6Q6LtS0 Message-ID: Subject: Re: Non-text mode for pg_dumpall To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: Mahendra Singh Thalor , Srinath Reddy , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 12, 2025 at 1:06=E2=80=AFAM =C3=81lvaro Herrera wrote: > > Hello, > > On 2025-Mar-11, Mahendra Singh Thalor wrote: > > > In map.dat file, I tried to fix this issue by adding number of characte= rs > > in dbname but as per code comments, as of now, we are not supporting \n= \r > > in dbnames so i removed handling. > > I will do some more study to fix this issue. > > Yeah, I think this is saying that you should not consider the contents > of map.dat as a shell string. After all, you're not going to _execute_ > that file via the shell. > > Maybe for map.dat you need to escape such characters somehow, so that > they don't appear as literal newlines/carriage returns. > I am confused. currently pg_dumpall plain format will abort when encountering dbname containing newline. the left dumped plain file does not contain all the cluster databases data. if pg_dumpall non-text format aborts earlier, it's aligned with pg_dumpall plain format? it's also an improvement since aborts earlier, nothing will be dumped? am i missing something?