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 1ticGo-000PPP-W8 for pgsql-general@arkaria.postgresql.org; Thu, 13 Feb 2025 16:40:59 +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 1ticGm-00AWTA-T7 for pgsql-general@arkaria.postgresql.org; Thu, 13 Feb 2025 16:40:57 +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 1ticGl-00AWPL-Ff for pgsql-general@lists.postgresql.org; Thu, 13 Feb 2025 16:40:57 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ticGi-000dry-04 for pgsql-general@lists.postgresql.org; Thu, 13 Feb 2025 16:40:55 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 8826C114018E; Thu, 13 Feb 2025 11:40:49 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 13 Feb 2025 11:40:49 -0500 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=fm2; t=1739464849; x=1739551249; bh=z9Esg+jWsVLFY9S2pLm+NUECAehWLTp3GS7NiEh3iLg=; b= OJy7TsjZj0jhu3Ap3mH4xIzmrPlvOnpL+QW6R/Wk0Y8giSY901w/jRn+YE55Do8D SM+9mKYKOGnpnmhRE7EVfjXLjLoQFXr0Yf7KkafAVUYGyAtEnFJMqZTGp9SP7WOM efsihn0jUeQrlyl074GtBonmGbZHbI88pcoxTgGFbYZiKZohQkt+y3omqC2NuyMg Smukv6nY+AJAxTNJVIaH8hwxR3trEBunNS3pGH+JWxgS3SMLJVO32QV2GJYrasS1 vKOgASOwSwQBdrHNp1zgAQXrv3bL88jO+E++Pcd2V+qJvJ1HeZQ54qVyQfKlrAYv HL1ha7aYxRMvSHqNniMOwg== 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=fm3; t=1739464849; x= 1739551249; bh=z9Esg+jWsVLFY9S2pLm+NUECAehWLTp3GS7NiEh3iLg=; b=h oG7ObVySsqaK18stgSEuQDaQJkHofEBhFU5tFusx/xTo1Sc/WRJFejhXGckd2xBl vCZQv30FyKzkYoRNBzjZwd3oXqkX6nmNn3zO/9qkIZI4XgXxzLjEZm9vXmY8RNvh OSwOE2W2JszcrhZ9EZ9RTxLrQV5VayT45ljVpMaJj3c9N28AGxFttBDfyVnk0WfR XeNg3brmIYGRO2qrPKytdgYHRX/e54UdWOr7oVe5BsewZvQdG2or7GxSNf17GA/M 6jPBh0P5uh+p20bStJOob1+JG+r/UYv1pPSS/gSK/W/rz7SCS8B+TyrnKNcuDGvY eXw1N89FxREfLb9UQ1P0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegjedvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpefgudefkefhveefleev ieeuveehvdduudekuddvvdelhfeuueeijedtuedvvedvueenucffohhmrghinhepphhosh htghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnh gspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphgruhhl rdhfohgvrhhsthgvrhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvg hnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Feb 2025 11:40:48 -0500 (EST) Message-ID: <0150a3d8-9276-4534-9847-8d3d7bba6e16@aklaver.com> Date: Thu, 13 Feb 2025 08:40:48 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: libc to libicu via pg_dump/pg_restore? To: Paul Foerster Cc: pgsql-general list References: <187f2c5d-f268-4596-bb63-c94790ae761d@aklaver.com> <99d51fe7-c6d2-4421-9456-07ed1f5703a2@aklaver.com> <5A9148A0-CF9C-4841-A9C0-D7E299AC4ADD@gmail.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <5A9148A0-CF9C-4841-A9C0-D7E299AC4ADD@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/13/25 08:17, Paul Foerster wrote: > Hi Adrian, > > sorry for the late answer. I'm just too busy. > >> On 7 Feb 2025, at 17:19, Adrian Klaver wrote: >> >>> With create database being "template template0", this is what my script does. But I need the -cC options for pg_restore to get ACLs back. Leaving out either one of them will not get me the ACLs back. >> >> That does not make sense. >> >> Are there ACLs(privileges) in the database at all? >> >> What is the pg_dump command you are running? > > I use this pg_dump command: > > pg_dump -Fc -Z1 --quote-all-identifiers -b "${PGDATABASE}" -f ${dumpBase}/${clusterName}.${PGDATABASE}.dump.gz >${PGDATABASE}.out 2>${PGDATABASE}.err & > > The command is embedded in a Bash script for loop that loops PGDATABASE over all database names inside the cluster and launches pg_dump as a background job. It then waits for all jobs to complete ("wait" command). dumpBase is just the destination directory. > > If I don't use -cC, i.e. both, then the Access privileges will not be restored. Checking with \l just shows an empty field as usual for a newly created database. This happens at least with 17.2. I didn't check that with 17.3 yet. Per: https://www.postgresql.org/docs/current/ddl-priv.html "If the “Access privileges” column is empty for a given object, it means the object has default privileges (that is, its privileges entry in the relevant system catalog is null). Default privileges always include all privileges for the owner, and can include some privileges for PUBLIC depending on the object type, as explained above. The first GRANT or REVOKE on an object will instantiate the default privileges (producing, for example, miriam=arwdDxt/miriam) and then modify them per the specified request. Similarly, entries are shown in “Column privileges” only for columns with nondefault privileges. (Note: for this purpose, “default privileges” always means the built-in default privileges for the object's type. An object whose privileges have been affected by an ALTER DEFAULT PRIVILEGES command will always be shown with an explicit privilege entry that includes the effects of the ALTER.)" From this: 1) It not unusual for the field to be blank. 2) \l only lists the privileges for the database object itself, not any of it's contained objects. In the original database are you executing explicit GRANTs on the database object? Do: pg_restore -s -f db_name.sql ${PGDATABASE}.out This will create a text version restore of the schema objects in the dump file. Then search the file for GRANT statements. > > Cheers, > Paul -- Adrian Klaver adrian.klaver@aklaver.com