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 1upzDX-00FVjz-DB for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Aug 2025 01:08: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 1upzDV-000558-6z for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Aug 2025 01:08:17 +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 1upzDU-000550-TX for pgsql-hackers@lists.postgresql.org; Sun, 24 Aug 2025 01:08:17 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1upzDS-001Qls-1m for pgsql-hackers@lists.postgresql.org; Sun, 24 Aug 2025 01:08:16 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-770305d333aso1705062b3a.0 for ; Sat, 23 Aug 2025 18:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1755997694; x=1756602494; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=BA1dQcFiLGcmrIrEMqOaOyA8WRA/WlH8wj2GS1LEqjc=; b=IUEIBpSEItNNGLu0VvhnC1S86JCpZ9U77QDMHJRtqdFcpMcL4JrWhreNrEkqPsSjNO IEwdPWzHSddomFS4Ht1l0+/K07RPGs6ob0/5dGiBmNi7kiwW500gqPJyZL2HKKuXGu9a 4/PxNfVJFNjwuhtnGeO086QF9DGUwUAF2R9bk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755997694; x=1756602494; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BA1dQcFiLGcmrIrEMqOaOyA8WRA/WlH8wj2GS1LEqjc=; b=ckGBsfNtF7KXQ1uQIC00TkHe1xdKfKit+ouNqC+wpZ9ULUeXaTqQhsDUqyAX/gPRJM baBu7qFBQjoYe8ZNhHQ+MvPimNOa2ZWFkmfhOXBilIM4ShTqKiZim8rq71eguz5MEeK3 3RjJEVu3aY2Gc3Q+5hZEG1vRDpPD+xqOxOjpGNiFqQ42fF1MmQEjGllTxMdX5408CNV5 XSy2HtR2Fu3UMJzuRm+chBL6hMAgM8kBF5g+pWfqRMj2Ct0HEh83beYU0XRSAfAtKNFn /UEkBoKmRqiDUgeQ3BMkDDERxVm+QC4bnNhCnNHR3wt8IB3PvavEYPxhWlsVujAtKa4d h/EA== X-Forwarded-Encrypted: i=1; AJvYcCVHb+UgpXEsgFDG06sSYZrfHd1zGvye6lWcK24/Sbh8V7LFTwOIJ9ZUPj4LzldzeOha1Eic70gt3rsa5qDn@lists.postgresql.org X-Gm-Message-State: AOJu0YwjVVgOjZCSF/F3eIDO5lsISl0kaxO36K60A5GB+AoMBdWRz9S3 eBJ5ShpNdTgsQuroPM4HkTcN61FfYhok0vb6oS7DOyeerkMdDl+uDCYDakUmfTJK4w== X-Gm-Gg: ASbGncsppc04XCw1wzDTLBswutQ3bWQazZ9RCIk5gp3bMINwFAkF1RRGawvyEiVbuK8 dcPvDKO8CsHcAs1UyMmTOF3Ts34TftLxs2Qanm4AZHj67kwHzKC8ibN/xuK/bx7XrnuuQbHXwoL 28XUbSIWXQlA+4kDySb59Mzz9BQXfhpLFtCea9/i8+Bm+lGEr0QHLwqucP8khGEsSN17AWvuSGD eciCXsIY8oTEvUYaw5gvjBdBgjgPen+fFUHQEuH3PSUBcrptRAKKnhRGw6l9WDwiwJvAFEWTnA2 5sbfIkl/R0jImR5mg6iiqUm8gSIvYf4G7LV2FS9m1k96EUDyubU3JSb6opl5Fr9B6+7t6Y/4f+J bGWLcpFQ+mUFibjbsN78aoT+Nptszhs++U5R38RLqLfEQd45eexE= X-Google-Smtp-Source: AGHT+IE4tCtf3kKnbLIRSITEwCxuuisSL3jRWUTH8X3x4aRok5/Sj778ctNy8QUpmyJXxBZ0vFaQUA== X-Received: by 2002:a05:6a20:7d9e:b0:243:78a:82c2 with SMTP id adf61e73a8af0-24340dafb84mr10696025637.60.1755997694083; Sat, 23 Aug 2025 18:08:14 -0700 (PDT) Received: from google.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3254bebe8d2sm3214125a91.27.2025.08.23.18.08.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Aug 2025 18:08:13 -0700 (PDT) Date: Sat, 23 Aug 2025 18:08:11 -0700 From: Noah Misch To: Andrew Dunstan Cc: Tom Lane , Mahendra Singh Thalor , =?iso-8859-1?Q?=C1lvaro?= Herrera , jian he , Srinath Reddy , pgsql-hackers@lists.postgresql.org Subject: Re: Non-text mode for pg_dumpall Message-ID: <20250824010811.4d.nmisch@google.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 30, 2025 at 02:51:59PM -0400, Andrew Dunstan wrote: > OK, now that's reverted we should discuss how to proceed. I had two thoughts > - we could use invent a JSON format for the globals, or we could just use > the existing archive format. I think the archive format is pretty flexible, > and should be able to accommodate this. The downside is it's not humanly > readable. The upside is that we don't need to do anything special either to > write it or parse it. I would first try to use the existing archiver API, because that makes it harder to miss bugs. Any tension between that API and pg_dumpall is likely to have corresponding tension on the pg_restore side. Resolving that tension will reveal much of the project's scope that remained hidden during the v18 attempt. Perhaps more important than that, using the archiver API means future pg_dump and pg_restore options are more likely to cooperate properly with $SUBJECT. In other words, I want it to be hard to add pg_dump/pg_restore features that malfunction only for $SUBJECT archives. The strength of the archiver architecture shows in how rarely new features need format-specific logic and how rarely format-specific bugs get reported. We've had little or no trouble with e.g. bugs that appear in -Fd but not in -Fc. If pg_backup_json.c emerged as a new backend to the archiver API, I'd not have concerns about that. But a JSON format specific to $SUBJECT sounds like a recipe for bugs. > There might also be other reasonable options. But I think we should stay out > of the business of using custom code to parse text. Agreed.