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 1s4I3l-002VS9-8N for pgsql-general@arkaria.postgresql.org; Tue, 07 May 2024 10:28:33 +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 1s4I3i-0023u2-KX for pgsql-general@arkaria.postgresql.org; Tue, 07 May 2024 10:28:31 +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 1s4I3i-0023tu-1J for pgsql-general@lists.postgresql.org; Tue, 07 May 2024 10:28:31 +0000 Received: from mail-db5eur02on2137.outbound.protection.outlook.com ([40.107.249.137] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4I3f-001zGE-2W for pgsql-general@lists.postgresql.org; Tue, 07 May 2024 10:28:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LMb42o+HaOQDVWIF1mEdVqmxPAJKIjcwAxeU+fXsPZmxRT03Ww9cg/JKlVIl79bGlwIzyWcp838OgE3fxgd3UKMA05vEbsbiZ+3kFzJSlMAhh1qhYimVzgs1+lypK0+WFOAQHYD+fbHOTr1CQsWP3UTYhRxTmd/siJcWkgJzK+DZ+cU9XuAmnH7iTW5BypA3d/WN903zVMWNYNDOIBcG6CwvlTp4+YHqYB0RlbLTSajGdUpFhvpOeARzkkhZiWg/97yk7/3ZKn4P3OZ/W6mrdtH3qj7YLp6U5pCskMVx+MfPPi6EgjDYskK5sUOSYfeL/MgWIUKUxSIaj8zI4yhKzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0NFPkuG8E8rDEURdYu+kspn2IiRaBIU1TZiH3jqO108=; b=eV4Ucda+QMM0Gq26RGj17Y8d6AXWOKQrsr8i7/3phmY2uSxfIs8IuJ0fJJyDacvpkFjBTjYWS/x62z9CpctIGBlS5a4ZIQCnm+SdCzIGEDOtoAachtIEwvSz0/rulO7v6ElEC4Gf0LQxZa+MUIhXFlvDU1NKSXxZHHhNJyJjtmMsQmVUeQnfZVvGxuvfqaf2wbS2tiOP5Dxml7HrIb5A3phtX+9e91hgRG0qrPlluM6am+oqtY6DOLpH0QfSWSYQ5FpN6S1sVVDs8C1ZLaXvwioI6CGAwhDrmmMXPZC9lGpU46Joy27owhzVJxPeG5m48hig7nv1LYRlb+vEYf9DCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=papula-nevinpat.com; dmarc=pass action=none header.from=papula-nevinpat.com; dkim=pass header.d=papula-nevinpat.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=papula-nevinpat.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0NFPkuG8E8rDEURdYu+kspn2IiRaBIU1TZiH3jqO108=; b=QVVJzxhwPiA5GS+9uBemEQeQZ3EkFsf48Og+BP30ZHL9E9KMO+Hw1PafzFfSDGaTEXIqApWbhQHar/lRb0xIEsFZ0ySsza8ebKNjbjLuTuB7SlNL6Gtipsks/LSie+5FxZSqLhSvRAGYeijSIQZ4gDl0gD9mT0ZtALjoXmFygE0= Received: from GV1PR01MB8579.eurprd01.prod.exchangelabs.com (2603:10a6:150:26::8) by AM0PR01MB6402.eurprd01.prod.exchangelabs.com (2603:10a6:20b:16d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Tue, 7 May 2024 10:28:23 +0000 Received: from GV1PR01MB8579.eurprd01.prod.exchangelabs.com ([fe80::751:f899:3e7a:acdf]) by GV1PR01MB8579.eurprd01.prod.exchangelabs.com ([fe80::751:f899:3e7a:acdf%5]) with mapi id 15.20.7544.041; Tue, 7 May 2024 10:28:23 +0000 From: "Frans Simmelvuo (Papula-Nevinpat)" To: "pgsql-general@lists.postgresql.org" Subject: pg_basebackup "Permission denied" error when initiating streaming replication Thread-Topic: pg_basebackup "Permission denied" error when initiating streaming replication Thread-Index: AdqgZPvkOs4nEgynRpKxVoKO3HinrA== Date: Tue, 7 May 2024 10:28:23 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=papula-nevinpat.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: GV1PR01MB8579:EE_|AM0PR01MB6402:EE_ x-ms-office365-filtering-correlation-id: 3b09237b-696f-46e3-ee18-08dc6e806c4c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|1800799015|366007|376005|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?KwavWtE1Z6e8JH+voinLHO9AdiVdKAEaGcwfQWcCqcbbTM2JLCF4lbalFbYb?= =?us-ascii?Q?kU54yqHGeg5+8ngpT75OgHSxxzxv9+PoFpYCiKFynqI7lR88gEomMUmAvD/a?= =?us-ascii?Q?f/JRsae5fkdABJOG1TmfurwVnI3+YfBg9cWKCCvy+GlMgEjzqdACu4JaeOHX?= =?us-ascii?Q?WqB4J1Kgi/hUXOKQ100wqe8VMvt+dAlHcuNNbc0fBXwbi0RqFoR0+IjHtSnV?= =?us-ascii?Q?kwhL0D+9hQFP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Wrz6YMQyS5C?= =?us-ascii?Q?jUVg4XFV2Q+B/IGWnAfDdmBNZCJXbRwWMiSwCbhQLKOZjtbPKEL+FJJrE0Sh?= =?us-ascii?Q?faolkftyC1gmcdmA+VauKjRVkUc+o4fd5tzp3XsynxwyKxqIpWwGlDCvhypT?= =?us-ascii?Q?jTIIKG9fLkg2iebPCH32xTiXSeI5re7e5HL1K8O8iK1HidjxfEY9S5mmNP4G?= =?us-ascii?Q?6phZZkQzQePuLNTNuqFGTwT5CEEt5upGwYZZP8PCelb7ag=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1PR01MB8579.eurprd01.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2btPSOeUEje1wGwbx6FYegsjT+dyCSexFdt2or9rYPcxzOd2C7NNCKJkZq0H?= =?us-ascii?Q?W6qOfG1FfNCSCkswrQX1c8yqmfOweNvby20uu/6VT4GWxCDk6DpaBPuiJy+C?= =?us-ascii?Q?v0SW7mGxKOttjDjVxxEP6EVQoI4aIbW5422JTgQEWnYXWBjWJ8n79B0GOKC4?= =?us-ascii?Q?b0b3B7/6no0JQTnDpY5om7FgUzoBXiH1BdlGOO4DusVavfusJY0+lC+BymaM?= =?us-ascii?Q?h1xKDE3tf6oLQ4E6Hkn+TgvP46V3Z3b5uEUDrhtoamlUdYG+LWguISurviRC?= =?us-ascii?Q?FDkVENy4LBboCXau0jqeZq2DDCIUGURrX7JQiz+ytVHogzvPBf2sZk3hgYEh?= =?us-ascii?Q?U5lVzKRGBv6aDTgmKdqlGZg4/8910+QooBHTiltwq9rlK5Gu7jOjepolmu3Y?= =?us-ascii?Q?L/0SL3nekWB0BOHyGx6HJma63Bn3EQYn4Eq0FSafQGX/49v56Z3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b/88a/n8Rki4BDJvtvH7XPJUixFnGjhv4wRz8x?= =?us-ascii?Q?d5LxpEpkZUoyA/qZNRZsISzWoJm0SWzxAZU57QR4U6+zeKi3XGRe+GhKDy43?= =?us-ascii?Q?3bzvN+BIhJHOiUNeS3Hn6cJEleML/359oG0ryyRAc8M/QXIULrqMBndkhXHO?= =?us-ascii?Q?MePm4s4912o59XxY/YIq0UyxAwpk9uFE3MzJC6C92O17v4QDLHAWKKokg7+G?= =?us-ascii?Q?w4C9IRhXiI+xPQ4mhfkLViazV6yINuvN+b86anMIuYqK6PrbTddoZzGLsizq?= =?us-ascii?Q?XQ=3D=3D?= Content-Type: multipart/alternative; boundary="_000_GV1PR01MB85793D04E48B1855BCA755ABA7E42GV1PR01MB8579eurp_" MIME-Version: 1.0 X-OriginatorOrg: papula-nevinpat.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: GV1PR01MB8579.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b09237b-696f-46e3-ee18-08dc6e806c4c X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2024 10:28:23.1019 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2784e481-228c-4a27-a9b6-e4f9b51d2882 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rhnDUf2OTrsbE1CcDWCWPlDDNCPIlpa7whvbkQLpwCOFAotrkI6tWZydAKTGJAEQ/iZxvzhJAxNgp6TCQCBZ2GCkvb09J9HLtm35D0t9phd9oRW6gy3MQMlOo5FyKeaJ X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR01MB6402 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_GV1PR01MB85793D04E48B1855BCA755ABA7E42GV1PR01MB8579eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I'm trying to initiate streaming replication between two Postgres 10 server= s on Windows. The source cluster is of size ~450gb, and the cluster consist= s of the primary data folder, and two separated tablespaces. One of the tab= lespaces is configured with a symbolic link inside Windows. Now, the problem I'm encountering is the following: I call pg_basebackup at the target as follows: >> pg_basebackup -h -U -p -W -D = -T "C:\Server Files\Data\ProgramsData\PostgreSQL\10\data\base\demo_tablesp= ace"=3DE:\PG_tablespace_data\10\demo_tablespace -T "C:\Server Files\Data\Pr= ogramsData\PostgreSQL\10\data\base\tsb_tablespace"=3DE:\PG_tablespace_data\= 10\tsb_tablespace -P -R -v This starts the pg_basebackup and it runs without problems for the duration= of copying the 450gbs of data. Then the output is the following: >>pg_basebackup: initiating base backup, waiting for checkpoint to complete >>pg_basebackup: checkpoint complete >>pg_basebackup: write-ahead log start point: 181/9000028 on timeline 1 >>pg_basebackup: starting background WAL receiver >>432917950/482036946 kB (100%), 3/3 tablespaces >>pg_basebackup: could not get write-ahead log end position from server: ER= ROR: could not open file "./base/demo_tablespace": Permission denied The demo_tablespace is the one that is a symbolic link from another folder.= After the error, I find that all the data is copied to the target tablespa= ces and primary data directory, but the data directory is missing all pg_..= . directories and configuration files. So no running database at target. I'm running the source Postgres service on Windows as a local account, the = command is given with administrator cmd and the ./base/demo_tablespace fold= er's security settings should have all needed permissions for the operation= . I have a hard time understanding why pg_basebackup can retrieve the data fr= om the ./base/demo_tablespace directory, and then suddenly gets denied. I'm= running out of ideas on what to try next. BR, Frans Simmelvuo --_000_GV1PR01MB85793D04E48B1855BCA755ABA7E42GV1PR01MB8579eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

I’m trying to initiate streaming replication between two Postgres 10 = servers on Windows. The source cluster is of size ~450gb, and the cluster c= onsists of the primary data folder, and two separated tablespaces. One of t= he tablespaces is configured with a symbolic link inside Windows.

 

Now, the problem I’m enco= untering is the following:
I call pg_basebackup at the target as follows:
>> pg_basebackup -h <SRC_IP> -U <SUPERUSER> -p <SRC_PO= RT> -W -D <TARGETDIR> -T “C:\Server Files\Data\ProgramsData\= PostgreSQL\10\data\base\demo_tablespace”=3DE:\PG_tablespace_data\10\d= emo_tablespace -T “C:\Server Files\Data\ProgramsData\PostgreSQL\10\da= ta\base\tsb_tablespace”=3DE:\PG_tablespace_data\10\tsb_tablespace -P -R -v

 

This starts the pg_basebackup a= nd it runs without problems for the duration of copying the 450gbs of data.

Then the output is the followin= g:

>>pg_basebackup: initiati= ng base backup, waiting for checkpoint to complete

>>pg_basebackup: checkpoi= nt complete

>>pg_basebackup: write-ah= ead log start point: 181/9000028 on timeline 1

>>pg_basebackup: starting= background WAL receiver

>>432917950/482036946 kB = (100%), 3/3 tablespaces

>>pg_basebackup: could no= t get write-ahead log end position from server: ERROR: could not open file = “./base/demo_tablespace”: Permission denied

 

The demo_tablespace is the one = that is a symbolic link from another folder. After the error, I find that a= ll the data is copied to the target tablespaces and primary data directory,= but the data directory is missing all pg_... directories and configuration files. So no running database at targ= et.

I‘m running the source Postgres service on Windows as a local account= , the command is given with administrator cmd and the ./base/demo_tablespac= e folder’s security settings should have all needed permissions for t= he operation.

 

I have a hard time understandin= g why pg_basebackup can retrieve the data from the ./base/demo_tablespace d= irectory, and then suddenly gets denied. I’m running out of ideas on = what to try next.

 

BR,

Frans Simmelvuo

--_000_GV1PR01MB85793D04E48B1855BCA755ABA7E42GV1PR01MB8579eurp_--