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 1u0nNi-0083SQ-DF for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 20:11:14 +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 1u0nNg-004KZS-Vv for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Apr 2025 20:11:13 +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 1u0nNg-004KZH-HA for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 20:11:12 +0000 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u0nNd-003PpU-04 for pgsql-hackers@lists.postgresql.org; Fri, 04 Apr 2025 20:11:12 +0000 Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6e8f05acc13so26207086d6.2 for ; Fri, 04 Apr 2025 13:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1743797467; x=1744402267; 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=TKFZyEjSbVjyWPMvMWtOM1tlcGUYiB2CgNazPuot5U4=; b=Pdoo+aF5zzJmpcboPr+R7YDW11CT5E5hUZ1ne7KfbvuIHgDhCnLeTuNuroE7dgj2g+ upbG9abJgV+fcMDunGp6FidvXHdknTCG+K5T7QXboGk9DkFuvTljpI03rh95a64mKwta ph4dBZ0/0iLHiVP/dg63z0s6khRXgQ5YQOa2mD+ttDj5M5iF6H+VLlan3v6kPQ0RkJ4F vo1hji+FsyZgN9wd6S+NLCtztqnEOblRsw0S7//ZTEVNHGwi1CAstmcjTNp1B0ECYWPk aL0st9XNY8rGdjMPKjzRmCmROKnLfsU1Tt41Tf633HaLmlATuQKXtGR3W/YB0tcfVTdB y3XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743797467; x=1744402267; 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=TKFZyEjSbVjyWPMvMWtOM1tlcGUYiB2CgNazPuot5U4=; b=JsnN4SINQOf4zIP27F6QXuRVAw1oGK/MjKLpHzea5kI6OYc82ZWGPAAiFzNxJQZHAP 0RB5eqSrQKnichfMgFBE2Mqy7QBbU4yEFnru5HLOzUsvM1P8iePGN/O2t9ufsSDyrIPn x5RU9Ss0zF2T+FaeATDUzFOWJnpLOwXEUXCIEEMekjGaBWImPVEBCWaEjBoZJSZtKZjH HiaEEy1hv/CBWfjZE9c2ICDbQAl6BwdZNNu1wcuJVGSgVUeRqWA8ah98t6CU0DGUUdPi s5e2q70o1qj6fwARBUkRyBxWfJ5Mu0a9VaPqg4FywXjZzduX/u/8SK3D2DzjonsL5Kh2 IYTw== X-Forwarded-Encrypted: i=1; AJvYcCVpjJ3Oh7NrkiAxe9F/vFlOw/g5RtXyibNa1O7rs0I6dph1qoX9TJukH67nofDC8IicleEZXzlAnNDeuF6K@lists.postgresql.org X-Gm-Message-State: AOJu0YynYYiNVYg/UIIqqC9gRRg08FsU5HLo2epb2NZlwOAfCxNazHDW cWXvYorQG7mr0LAXqjkzaOeCPuyII6xZq2jnK9PolzrHJHNuVsWabiVxbqAtCrQ= X-Gm-Gg: ASbGncuirxUkG9B4VRj6YIp+dMV972Y5Csagp28dvPKtde8tgQsJhFLRoMEISEFYg9Z XXFcR1ixyrrKXqedUC3ka+1R7SB2ydbSyqpUGY0I4tc7bkQpgMPA5iSNvsAseAxy4SKzsMabPTY I5azz0mS7PsEAWZv5lAP7tVm7WZpgKJ5AAcxMHAWJzqTYBDRYi+Fc+eT+2KFbMUc0q611wmfEB9 t9Qzefov+ju/FiWTn+e9Aw/NUh3wyECMDXHt/nSiIWkimzwaDdbSDYK8L0Rz1fZT+OFdSTSdqvZ pxIF4r+H0bYZnvZCuL0WouL1z6+mOr+xEK2uTZ31va5bcVP8l2igNF7RklLn7sN4wQ== X-Google-Smtp-Source: AGHT+IEaABtlq7qMnTbxZd+1Gvoy9OPD8le/nbhKoSBBG3w1gnudTcPUekeMF+z4/FfoIBGEbvIS/Q== X-Received: by 2002:a05:6214:1c4c:b0:6eb:1eef:c2ed with SMTP id 6a1803df08f44-6f00de8c4cemr70786536d6.9.1743797467332; Fri, 04 Apr 2025 13:11:07 -0700 (PDT) Received: from ?IPV6:2605:a601:a681:6b00::1cb? ([2605:a601:a681:6b00::1cb]) by smtp.googlemail.com with ESMTPSA id 6a1803df08f44-6ef0f00ec2esm25449916d6.47.2025.04.04.13.11.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Apr 2025 13:11:06 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------vzsSlZCP2Vw9015M5Dg2sW9u" Message-ID: <948154fe-0278-4f4c-8f5a-085e12f03163@dunslane.net> Date: Fri, 4 Apr 2025 16:11:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Non-text mode for pg_dumpall To: Mahendra Singh Thalor Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , jian he , Srinath Reddy , pgsql-hackers@lists.postgresql.org References: <202503311812.vxg5b7rzfgf6@alvherre.pgsql> <616efe2c-3986-43cf-b88c-4435849acf9e@dunslane.net> From: Andrew Dunstan Content-Language: en-US Autocrypt: addr=andr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Jgjz112O4fUe3p9wfAaFa0RXHc5S GPzRTYRRlv/XZBIho4J2tkZOnteZJZ+GbxQVlINt6fd8P6al3MWOvpP/ExJPguEfjOsO6Njy xjo3WfpD4lHMOR/Oc3/8mScEF84rF2jXbsFgelWnbPWAvXY+pD0dXOFRkagGmC/viwBDqq5b 5tk76kKmUbZxABEBAAHCwHwEGAEIACYCGwwWIQTkPlhGHfx8v0RpFaWZ+n/LWfw7gQUCZFlx 5wUJGVGAjgAKCRCZ+n/LWfw7gf+iB/4g8CPY5jihf5r/8EsoIGe2H+dpVmpPF8YGBzTIvCz/ fQoOq8AX/pE76QEuFnFZWfjw+wgBXgCVmkox2Eflkk6z4ND3pcwGZ6CfCxTQCDk/dij+2DQ4 6bmDCy/sBgcbz9mTpoLC11HLoPae6YN9nBNQRZDcEFEu54OaVOqlIdbA6m+POIBCXZdHOFc0 WoDTgxHRzC1jgQNidyd6tKqcsVJs0dzF0oKTmFFmUAqTdJO12LBuNA1rlqrR3EtpYk8B/wtS 5dIMD7Q8hwQpL+4C6GNpb6ZKnPkLi47pDOLhz2qBrqN+rqUEsT3YnExYpzj5yOBi+FlmV1Hw 49QYe1sn2ZPs In-Reply-To: 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. --------------vzsSlZCP2Vw9015M5Dg2sW9u Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2025-04-04 Fr 5:12 AM, Mahendra Singh Thalor wrote: > On Fri, 4 Apr 2025 at 13:52, Mahendra Singh Thalor wrote: >> On Fri, 4 Apr 2025 at 01:17, Andrew Dunstan wrote: >>> >>> On 2025-04-01 Tu 1:59 AM, Mahendra Singh Thalor wrote: >>>> On Mon, 31 Mar 2025 at 23:43, Álvaro Herrera wrote: >>>>> Hi >>>>> >>>>> FWIW I don't think the on_exit_nicely business is in final shape just >>>>> yet. We're doing something super strange and novel about keeping track >>>>> of an array index, so that we can modify it later. Or something like >>>>> that, I think? That doesn't sound all that nice to me. Elsewhere it >>>>> was suggested that we need some way to keep track of the list of things >>>>> that need cleanup (a list of connections IIRC?) -- perhaps in a >>>>> thread-local variable or a global or something -- and we install the >>>>> cleanup function once, and that reads from the variable. The program >>>>> can add things to the list, or remove them, at will; and we don't need >>>>> to modify the cleanup function in any way. >>>>> >>>>> -- >>>>> Álvaro Herrera Breisgau, Deutschland —https://www.EnterpriseDB.com/ >>>> Thanks Álvaro for the feedback. >>>> >>>> I removed the old handling of on_exit_nicely_list from the last patch >>>> set and added one simple function to just update the archive handle in >>>> shutdown_info. (shutdown_info.AHX = AHX;) >>>> >>>> For first database, we will add entry into on_exit_nicely_list array >>>> and for rest database, we will update only shutdown_info as we already >>>> closed connection for previous database.With this fix, we will not >>>> touch entry of on_exit_nicely_list for each database. >>>> >>>> Here, I am attaching updated patches. >>>> >>> >>> OK, looks good. here's my latest. I'm currently working on tidying up >>> docco and comments. >>> >>> >>> cheers >>> >>> >>> andrew >>> >>> >>> >>> >>> -- >>> Andrew Dunstan >>> EDB:https://www.enterprisedb.com >> Thanks Andrew for the updated patches. >> >> Here, I am attaching a delta patch with some more TAP-test cases. >> > Here, I am attaching an updated delta patch which has some more TAP > tests. Please include these tests also. This patch can be applied on > v20250403_0004* patch. > Thanks. I have pushed these now with a few further small tweaks. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------vzsSlZCP2Vw9015M5Dg2sW9u Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2025-04-04 Fr 5:12 AM, Mahendra Singh Thalor wrote:
On Fri, 4 Apr 2025 at 13:52, Mahendra Singh Thalor <mahi6run@gmail.com> wrote:
On Fri, 4 Apr 2025 at 01:17, Andrew Dunstan <andrew@dunslane.net> wrote:

On 2025-04-01 Tu 1:59 AM, Mahendra Singh Thalor wrote:
On Mon, 31 Mar 2025 at 23:43, Álvaro Herrera <alvherre@alvh.no-ip.org> wrote:
Hi

FWIW I don't think the on_exit_nicely business is in final shape just
yet.  We're doing something super strange and novel about keeping track
of an array index, so that we can modify it later.  Or something like
that, I think?  That doesn't sound all that nice to me.  Elsewhere it
was suggested that we need some way to keep track of the list of things
that need cleanup (a list of connections IIRC?) -- perhaps in a
thread-local variable or a global or something -- and we install the
cleanup function once, and that reads from the variable.  The program
can add things to the list, or remove them, at will; and we don't need
to modify the cleanup function in any way.

--
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
Thanks Álvaro for the feedback.

I removed the old handling of on_exit_nicely_list from the last patch
set and added one simple function to just update the archive handle in
shutdown_info.  (shutdown_info.AHX = AHX;)

For first database, we will add entry into on_exit_nicely_list array
and for rest database, we will update only shutdown_info as we already
closed connection for previous database.With this fix, we will not
touch entry of on_exit_nicely_list for each database.

Here, I am attaching updated patches.


OK, looks good. here's my latest. I'm currently working on tidying up
docco and comments.


cheers


andrew




--
Andrew Dunstan
EDB: https://www.enterprisedb.com
Thanks Andrew for the updated patches.

Here, I am attaching a delta patch with some more TAP-test cases.

Here, I am attaching an updated delta patch which has some more TAP
tests. Please include these tests also. This patch can be applied on
v20250403_0004* patch.



Thanks. I have pushed these now with a few further small tweaks.


cheers


andrew

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