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.96) (envelope-from ) id 1vvwiL-00BlEE-3D for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Feb 2026 12:13:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvwiK-0037tE-2m for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Feb 2026 12:13:00 +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.96) (envelope-from ) id 1vvwiK-0037t6-13 for pgsql-hackers@lists.postgresql.org; Fri, 27 Feb 2026 12:13:00 +0000 Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vvwiG-00000001Z5Y-34tF for pgsql-hackers@lists.postgresql.org; Fri, 27 Feb 2026 12:12:59 +0000 Received: by mail-qv1-xf41.google.com with SMTP id 6a1803df08f44-899a5db525cso17993786d6.3 for ; Fri, 27 Feb 2026 04:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1772194375; x=1772799175; 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=3myERzt65Nr8BUUb3nWce56Ubupq052vJXvVRB8tq1E=; b=WlmXK0vmOuN+SEdFp/RF7P+Txc+DTJxS0fU5ylgo7iMPeVeCvvsi5XYrjWkzkBQVdl dFOjzqMjctSOIkRjA24Bx+IMWsEDAnC0KfaOWDdrgfdM2e72ExX7pj4SVbeOUMwSJv+2 TP9TkkB1RWCy1MXe0ZL7E2arq025CZjC1miSe0MsmQ60wKSO6LLPlIXITsCSeTgpVKDu sDCqwSuqIZCwjn94UJUJ8L+/Mc/2GeFoMKAI35MOk46HANGzOrET5Nl3h8X/4zEDkVux PYtX1oymjL7UdpO6tZoxvTnenST8sfSSEvQdEajCVa4G5Ppwn/qXkuS9CZUx6PQbJjgA mx9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772194375; x=1772799175; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3myERzt65Nr8BUUb3nWce56Ubupq052vJXvVRB8tq1E=; b=DwWs4DDfXbPhDN2auCXy4NAz4z8UDEkw7JQwCr3ikyqkxYvA+eUfkgfOfbrBhSiE8s 20bHGmcYm2SWw3GpnuHVqWx0xkIxmUP/2U/nfzXm/IQjZTEHs5XRBVca80qB8IHVF5fY KEaUsP5Gk6AX6M76+1V7xfJICWEtgYSB7JIhqUE5lXhbgukEb8BhyPjr8hqM6buWBsjw AlSuII8a/QnFemaEJyTO7IxowBcqAkJcSi0EsUVLWzDeoPlGxq/NLEYxpBE4AgDgzfp+ MWpnvww5ItWwD7wHMCfjgPSNpfd7inpKnSYfqYnpJPlLqNNaQo9icf/zXL7tydbjeoWR so2w== X-Forwarded-Encrypted: i=1; AJvYcCVLRsd2saYq4zaNeB7uFnDPY4OhvqmkOt9iwfEjV7D3/DeB/JERDwOgbx9YCtOjCM0/qk0ZXtKbJ/eRc8sZ@lists.postgresql.org X-Gm-Message-State: AOJu0YwIbcj8uK6zXdQSrJj+Iq7fYkaAqFg6NOzY5k95LlOtqxR9//KH 9UHe3MxBXbjlowWr49nGoeR7bvJ0tg6bKm+1dWX5rVzrtfmxQ0j0UlHsIyyR2aLoC1s= X-Gm-Gg: ATEYQzxsAioukscfbO5vav1yMG4KfhsHNVGWBa8Nmjvr22Cebn32XmM+8KjMogsV20U RlgHYrauPEDWUA/Agf8VZ2+KlYAmBr/ImrfX6dSNoycR7NF884pg6M1MYMe+kCCgsoymQNltGKN W/q2iPryXg53YxioC4B3VuQngKWSA1xuEatSwNm6Sh/ywejRjpZcyAtchQQwuvu7OWrNwydt8nb Of46EJVM4uXFirtk1XFSePiBumyrIqeGOpWdqPoKmDi7ShNTld84ICcd06zYMQWU5OsKNHBrnox K1vV056GCfL8RheEB9wqOuAwu6WSaxKk7423KS3eFjdhlB73/wNFnG0dTti+d+IYMRv6zfLce6w NJobPB6BMlxlvPRZw9onPaSvnXEnJTB3Xk3Pl6cswlkK1m3ZolplWZWsV/aUBw4QpdtZglopXX5 YHmDT9OQWkukH4GZj7OX1rcXtTkB2lFw== X-Received: by 2002:ad4:5b8f:0:b0:895:5dd:3d5a with SMTP id 6a1803df08f44-899d1e58cacmr37287096d6.45.1772194375083; Fri, 27 Feb 2026 04:12:55 -0800 (PST) Received: from ?IPV6:2605:a601:a6b0:500::1cb? ([2605:a601:a6b0:500::1cb]) by smtp.googlemail.com with ESMTPSA id 6a1803df08f44-899c7377d7dsm39431176d6.26.2026.02.27.04.12.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Feb 2026 04:12:54 -0800 (PST) Content-Type: multipart/alternative; boundary="------------V30t9L4axN7zjltRxzK0NGeV" Message-ID: Date: Fri, 27 Feb 2026 07:12:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Non-text mode for pg_dumpall To: Tom Lane Cc: jian he , Mahendra Singh Thalor , tushar , Vaibhav Dalvi , pgsql-hackers@lists.postgresql.org References: <3f22a8bb-29e8-40cc-97a1-309181da2c13@dunslane.net> <4022765f-38ee-48a3-b246-615b3f8e1c23@dunslane.net> <59d3616f-6d6d-40d5-87e2-e019e350b52d@dunslane.net> <7faf3a59-cfe1-45cb-a972-55e05560b414@dunslane.net> <2e7ada75-422c-4153-9437-ea0ce8d63521@dunslane.net> <84764ef6-2bcb-43f7-9037-d7! b589857da9@dunslane.net> <740033.1772142754@sss.pgh.pa.us> 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: <740033.1772142754@sss.pgh.pa.us> 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. --------------V30t9L4axN7zjltRxzK0NGeV Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2026-02-26 Th 4:52 PM, Tom Lane wrote: > https://www.postgresql.org/message-id/2fb787be-79f2-4161-8ba4-24e8cab019ac%40dunslane.netAndrew Dunstan writes: >> pushed with a slight tweak. > BF member pollock isn't pleased with 007_pg_dumpall: > > 026-02-26 20:18:10.389 UTC [14469:1] FATAL: could not create semaphores: No space left on device > 2026-02-26 20:18:10.389 UTC [14469:2] DETAIL: Failed system call was semget(668039, 17, 03600). > 2026-02-26 20:18:10.389 UTC [14469:3] HINT: This error does *not* mean that you have run out of disk space. It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded. You need to raise the respective kernel parameter. Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its "max_connections" parameter. > > It looks to me like this is happening because the script creates a > boatload of postmasters and doesn't bother to shut any of them down > (until that happens implicitly at script end). That seems rather > unfriendly to small BF machines in the first place, as well as for > installations that might try to run multiple TAP scripts in parallel. > > It's probably eating an undue amount of disk space, as well. > > Is there a reason why the "foreach my $run (sort keys %pgdumpall_runs)" > loop leaves the $target_nodes running, instead of cleaning each one > up at the bottom of the loop? No, I think it's just an oversight. I'll add this at the bottom of the loop: +   $target_node->stop; +   $target_node->clean_node; More generally, perhaps we should have a DESTROY method in Cluster.pm that would call the stop method when an object goes out of scope. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------V30t9L4axN7zjltRxzK0NGeV Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2026-02-26 Th 4:52 PM, Tom Lane wrote:
https://www.postgresql.org/message-id/2fb787be-79f2-4161-8ba4-24e8cab019ac%40dunslane.netAndrew Dunstan <andrew@dunslane.net> writes:
pushed with a slight tweak.
BF member pollock isn't pleased with 007_pg_dumpall:

026-02-26 20:18:10.389 UTC [14469:1] FATAL:  could not create semaphores: No space left on device
2026-02-26 20:18:10.389 UTC [14469:2] DETAIL:  Failed system call was semget(668039, 17, 03600).
2026-02-26 20:18:10.389 UTC [14469:3] HINT:  This error does *not* mean that you have run out of disk space.  It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded.  You need to raise the respective kernel parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its "max_connections" parameter.

It looks to me like this is happening because the script creates a
boatload of postmasters and doesn't bother to shut any of them down
(until that happens implicitly at script end).  That seems rather
unfriendly to small BF machines in the first place, as well as for
installations that might try to run multiple TAP scripts in parallel.

It's probably eating an undue amount of disk space, as well.

Is there a reason why the "foreach my $run (sort keys %pgdumpall_runs)"
loop leaves the $target_nodes running, instead of cleaning each one
up at the bottom of the loop?


No, I think it's just an oversight. I'll add this at the bottom of the loop:

+   $target_node->stop;
+   $target_node->clean_node;

More generally, perhaps we should have a DESTROY method in Cluster.pm that would call the stop method when an object goes out of scope.


cheers


andrew


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