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 1ufO97-006aZV-Ob for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Jul 2025 19:31:58 +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 1ufO96-004Fvn-2u for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Jul 2025 19:31:56 +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 1ufO95-004Fve-KJ for pgsql-hackers@lists.postgresql.org; Fri, 25 Jul 2025 19:31:56 +0000 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ufO92-000pK6-09 for pgsql-hackers@lists.postgresql.org; Fri, 25 Jul 2025 19:31:55 +0000 Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-7e29d5f7672so219731785a.3 for ; Fri, 25 Jul 2025 12:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1753471910; x=1754076710; darn=lists.postgresql.org; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=gL6o5enzcIQWoa9WVZcHKoUh0WS/pxwEAubLtJ21pCo=; b=vc1LJmIIak7SUv8S0r8cRX9Rj0jxZ8w2NlgQDrKaYZcHk1JdfWmZP0/g106xaOJFy2 sxENXtpl1lQTltzZidF+DuniIbpso0TFdUGrTbLNnwINF3cPy6WGEvoLVnjtBP/PsZZ8 wWkBf1cjUxWAK5V/M0Xo3xY4ARfqQdzU69kwidhAmeBibfbOYgXLGVIAG45tlADLYmAu ex/bBLmgtxltSejbUfInGiHDkEbco2RrPNww8sFn/ZORbKZNLGxyC49z7CWHkNDmo0q/ HW8QLa0CyF9Egis/ey2ZomnXrh0nPvgGe07IqqPwEyk0+3uvUQ5YgK/YsgDYYojiUdkD UeQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753471910; x=1754076710; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gL6o5enzcIQWoa9WVZcHKoUh0WS/pxwEAubLtJ21pCo=; b=BTBFJKOQBJaHCDNcI1L1kgGP4uHMFg4Mwb4ZGwnIB1qii7ZQ858LLsCAz9A9e3Fwxo iMnnUHneB8gXa0hcJ/7qXPOADYwvFnypd0/4uBW8Q6OJwGouWbWQBqSagtN42jgu9cPZ G9qCkr8W5kFgmKjjj79OUK5EgiRGDtmmQJOLYzeyMIMcqJ3xqyOc6VuqgcOi9d0M0DcX KP6v7Z8ue7z9DT2MpHpBc73Ew9sEmnqfHqqiaIAc0M+GWPxC58svTjGhMRpxtjVRyiQy tG+pP/MUIkcDXx7rc3dJhjA7kD3o75xdaBiyrdsH/Ug1P3FwodBOIhnvJlUS9oWULD5Z GMBA== X-Forwarded-Encrypted: i=1; AJvYcCXB13wAbMth5Yfy3v7qKjAxTvWLVj+FFK6ozN7NOx9aLVtrtU6PLGkpIBswuJSNQIJk93A91PEmOl7xLoeD@lists.postgresql.org X-Gm-Message-State: AOJu0YzH4DwjG6ehN42tp/3YXC0DJeg4M0a2pZpSm0FssggMaj9Lc75L 3sQ/U8clhDAM26iRrLk5plBv1S2rs/fxfPn9CqsAAu69dQJqxRik2GMi9pH5Xnu1W6k= X-Gm-Gg: ASbGnctH4uf9hdbbiSyxgYiWOSXnQi4R5twB5Rxerw6pLFIZm3Mi0tzT6cG8PQeCuFw ehl58E5YwZ7rXaFcBOJGUG502ZBt+3hqDFCcyimGYwdukh0XgpUHyVNTmEv7oL8YH9bxeeu6E0Y zmxkEObZX5GFt60pK2tKBOHV1pCPDdHKliFf0GHCbeHD3oFXsVAeleHWY6DAVYnqTniWOiFC23M QYsDXnj13rbYN51YGIf9QUuQa95A4JTtMNoXxPkVF6jm2w57CJludOo3fsnDEtJohoLKiDGPsxp tmgPReVbOAbXTPPwT/H44peGTXfKFjLi0eyHGrH4mWtZHj5nhEgP3BYpTLEKNPuKbwTb96+FQFG e0pJbfFFEmyvWzf2viT4snW3HbI9ctA== X-Google-Smtp-Source: AGHT+IEx2piKhjSenpQyRBTEhCq1DQNgQl89nm3dH8IdewuOFR2Z6hahDP2xyAAWO2+4ExiElP9biw== X-Received: by 2002:a05:620a:98e:b0:7e3:2f18:e2a2 with SMTP id af79cd13be357-7e63bf8cb1bmr286211185a.38.1753471910099; Fri, 25 Jul 2025 12:31:50 -0700 (PDT) Received: from ?IPV6:2605:a601:a6b0:500::1cb? ([2605:a601:a6b0:500::1cb]) by smtp.googlemail.com with ESMTPSA id af79cd13be357-7e6432a6c65sm32734785a.33.2025.07.25.12.31.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Jul 2025 12:31:49 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------ZWF6U1aGYKhYsnxz2WYLUsgr" Message-ID: Date: Fri, 25 Jul 2025 15:31:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Non-text mode for pg_dumpall To: Noah Misch Cc: Mahendra Singh Thalor , =?UTF-8?Q?=C3=81lvaro_Herrera?= , jian he , Srinath Reddy , pgsql-hackers@lists.postgresql.org References: <948154fe-0278-4f4c-8f5a-085e12f03163@dunslane.net> <20250708212819.09.nmisch@google.com> <20250716001957.c6.nmisch@google.com> <3f22a8bb-29e8-40cc-97a1-309181da2c13@dunslane.net> <20250722005339.ca.nmisch@google.com> <20250725162141.6f.nmisch@google.com> From: Andrew Dunstan Content-Language: en-US Autocrypt: addr=andrew@dunslane.net; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNJEFuZHJldyBEdW5zdGFuIDxhbmRyZXdAZHVuc2xhbmUubmV0PsLAlwQTAQgAQQIbAwIX gAIZAQULCQgHAwUVCgkICwUWAgMBAAIeBRYhBOQ+WEYd/Hy/RGkVpZn6f8tZ/DuBBQJoGNGd BQkdEO8nAAoJEJn6f8tZ/DuBq74H/jkTR4Zi3stbw+xC7v2u3QozssK7MYPL2AsVfh7OealS h182fiWXpfvmmAB7WUHbhk9GC2RAOnHI/2d2jgKaMLAHsGYOT0YopTVIwRY43fCw/mK67yxc wmDcX+zyKfLaivNbf5A7QPLNwda98bEAMSJ8Sn652Uc6cA8t3uKGsVzbRBQOoYzjgvBCfSrE 9ql3PDNg0l4BfAqabd2f70ZUm9VAMEPrgv/v2xI7M2XiL4g5BVmqLCOwxLM8RMCotCuoweUr VO43DeBCIDwLxotMJKvGWDjBzQYlU1NPUAtNcz/gN9ITUe1VUGjyvGj4u1lxBOcQQUw7l1+T 5moZ4iZxXzvOwE0ETspYWQEIANGc4zQULOxhbqO2dyD51YhqCNRmm9oKWaqf+wmW4tpDe/VV cxAnNizd4LWCHfzpb5cHAtGkOPePMfzWVf6nvdF7d3eglbtf59+zG7O7llV0xSSoFiieQBsr GvqDInXYX/4mRRXMtyhM353/tixC9RWLs1oofyYmCPPXXY7h9R7en3B8BoVrRFcdzlIY/NFN hFGW/9dkEiGjgna2Rk6e15kln4ZvFBWUg23p93w/pqXcxY6+k/8TEk+C4R+M6w7o2PLGOjdZ +kPiUcw5H85zf/yZJwQXzisXaNduwWB6Vads9YC9dj6kPR1c4VGRqAaYL++LAEOqrlvm2Tvq QqZRtnEAEQEAAcLAfAQYAQgAJgIbDBYhBOQ+WEYd/Hy/RGkVpZn6f8tZ/DuBBQJoGNI2BQkd EODdAAoJEJn6f8tZ/DuBfw0IAKTsfD40teP/pp+bsLLMSxPXUYrrprTj7WFB5v61p6dkpSr/ qXmMlyahdxQFaPmfVgVirB1Vk/kHiWNnnGjfUV9nB2Zg9LI0Xb9/ts3LsUiRWXzG3tkMY6XL vsVOxW4XFRND9l2q+WW93aZ1DZl+fqWfYgMvsusFRhmGFOKTRfKPta2Pkv+AhA24N4+PrR5p bU4k2MO8PAGiK8eaYKGFG1bHKuAvoDoF7WXJ3FHxuWqLnKEt4dfOLm5pAe3zq1Lt6q8azT9i QWGpSAK5vQUWQHBHpiDjdPeqKZ6HiAXIIKfSmb+jrvXBqoP+D6/K7rUjG2aXiRtTIAXms9sm VRu7cmw= In-Reply-To: <20250725162141.6f.nmisch@google.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------ZWF6U1aGYKhYsnxz2WYLUsgr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2025-07-25 Fr 12:21 PM, Noah Misch wrote: > On Thu, Jul 24, 2025 at 04:33:15PM -0400, Andrew Dunstan wrote: >> On 2025-07-21 Mo 8:53 PM, Noah Misch wrote: >>> I suspect this is going to end with a structured dump like we use on the >>> pg_dump (per-database) side. It's not an accident that v17 pg_restore doesn't >>> lex text files to do its job. pg_dumpall deals with a more-limited set of >>> statements than pg_dump deals with, but they're not _that much_ more limited. >>> I won't veto a lexing-based approach if it gets the behaviors right, but I >>> don't have high hopes for it getting the behaviors right and staying that way. >> I have been talking offline with Mahendra about this. I agree that we would >> be better off with a structured object for globals. But the thing that's >> been striking me all afternoon as I have pondered it is that we should not >> be designing such an animal at this stage of the cycle. Whatever we do we're >> going to be stuck supporting, so I have very reluctantly come to the >> conclusion that it would probably be better to back the feature out and have >> another go for PG 19. > That makes sense to me. It would be quite a sprint to get this done in time, > and that wouldn't leave much room for additional testing and feedback before > the final release. I agree with the reluctance and with the conclusion. Before we throw the baby out with the bathwater, how about this suggestion? pg_dumpall would continue to produce globals.dat, but it wouldn't be processed by pg_restore, which would only restore the individual databases. Or else we just don't produce globals.dat at all. Then we could introduce a structured object that pg_restore could safely use for release 19, and I think we'd still have something useful for release 18. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------ZWF6U1aGYKhYsnxz2WYLUsgr Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


On 2025-07-25 Fr 12:21 PM, Noah Misch wrote:
On Thu, Jul 24, 2025 at 04:33:15PM -0400, Andrew Dunstan wrote:
On 2025-07-21 Mo 8:53 PM, Noah Misch wrote:
I suspect this is going to end with a structured dump like we use on the
pg_dump (per-database) side.  It's not an accident that v17 pg_restore doesn't
lex text files to do its job.  pg_dumpall deals with a more-limited set of
statements than pg_dump deals with, but they're not _that much_ more limited.
I won't veto a lexing-based approach if it gets the behaviors right, but I
don't have high hopes for it getting the behaviors right and staying that way.
I have been talking offline with Mahendra about this. I agree that we would
be better off with a structured object for globals. But the thing that's
been striking me all afternoon as I have pondered it is that we should not
be designing such an animal at this stage of the cycle. Whatever we do we're
going to be stuck supporting, so I have very reluctantly come to the
conclusion that it would probably be better to back the feature out and have
another go for PG 19.
That makes sense to me.  It would be quite a sprint to get this done in time,
and that wouldn't leave much room for additional testing and feedback before
the final release.  I agree with the reluctance and with the conclusion.



Before we throw the baby out with the bathwater, how about this suggestion? pg_dumpall would continue to produce globals.dat, but it wouldn't be processed by pg_restore, which would only restore the individual databases. Or else we just don't produce globals.dat at all. Then we could introduce a structured object that pg_restore could safely use for release 19, and I think we'd still have something useful for release 18.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------ZWF6U1aGYKhYsnxz2WYLUsgr--