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 1uRdQf-00ENlv-RA for pgsql-general@arkaria.postgresql.org; Tue, 17 Jun 2025 21:01: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 1uRdQd-00D49y-2I for pgsql-general@arkaria.postgresql.org; Tue, 17 Jun 2025 21:01:11 +0000 Received: from makus.postgresql.org ([72.32.157.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 1uRdQc-00D45x-8D for pgsql-general@lists.postgresql.org; Tue, 17 Jun 2025 21:01:11 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uRdQX-002agC-2H for pgsql-general@postgresql.org; Tue, 17 Jun 2025 21:01:09 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id 8114711401D0; Tue, 17 Jun 2025 17:01:03 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Tue, 17 Jun 2025 17:01:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1750194063; x=1750280463; bh=M6ROung4Mo+eQqddIjMIw4j5IKE/+33PjQAQMBHBMSI=; b= eAxW1OAWmAzGsS/EU/EIDTGvFx9uyRoss4170cQEgGX/EbqxW4cDhk54Vzu8cLvW YsRTXPiMI9kfcQuagIqFmJ8cLOoejg++ni0ABuqEXMTvCVMqhIsnfw94yj59hbul D5popUjI8tnq8q/rLVVUoxOv+cgp/iGY/W/U82eVYZ1Ciuv/JOOEoQPoOof4W0/e mdbBNUQgm7w1OEghpDwjnHW6oaHdhh39wBI/2daUw0LEQ7Lq9a8JsYvgfeWOb9d0 jWsgGWbKj++f1qVWIi8hS2Kbe/TWp/7B6JbqTs8sQcAFpsEZy3JggJ24GjJY+CjQ 8W1XI2m33qVs5iYWGoC0Mg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1750194063; x= 1750280463; bh=M6ROung4Mo+eQqddIjMIw4j5IKE/+33PjQAQMBHBMSI=; b=I Vs4UcugiQYIej95N+Otf7bN4z+v6WwmclhcMkdGOV1C2TVzKpQ2rX7fqQArmASuD gqHOxx3JTKTRXZ/MQHwqAXfMjS5tTaWCSOuwB0LHZ6qunXrLVYf/LeyKuTWRLTf2 OHUKj0KxcKskkMYaW3p/VaR7BoHM3Z4IYn4TSLdkjpurn3Wyp6n/ePmTWa6eZiZz IfXpzbrq14f2vMyaUO9oYOAaagjWFDyX835b8M1eCrxQPkaknTg6i3PS4vqSK9XY Ht2KFOt54xFl1RopGxeab1J61qMm5tEKICnxyG2GvJQH0EsUJU5CIBJKcUrAK61v tLWn0kvbsg09uZL/FB7xg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhephfeviefhveelffeftdeh udekveefhfeftdegieefveetfffgfeehtdfftedutedtnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepghhoiigurghlsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhq lhdqghgvnhgvrhgrlhesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Jun 2025 17:01:02 -0400 (EDT) Message-ID: Date: Tue, 17 Jun 2025 14:01:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Changing locale of an existing database To: Marcin Gozdalik Cc: pgsql-general@postgresql.org References: <603f35e6-32b2-4044-bbfb-5e70bba5164b@aklaver.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 6/17/25 10:30, Marcin Gozdalik wrote: > Around 100 DBs, ranging from 1TB to 50TB. > Initial testing showed that it takes 1.5h to dump the DB and 3h to > restore it for a DB of around 3TB. > > Just recreating the indexes takes around 30 minutes on the same DBs. > > I understand that pg_dump/pg_restore is the safe route but it's too slow > for me so I'd like to understand if I have any alternative. Alright I see the issue. I don't know enough about this to say whether directly altering the system catalog would be a safe operation or not. An answer to that is going to need to come from someone with more knowledge on Postgres internals then I. -- Adrian Klaver adrian.klaver@aklaver.com