Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huP9x-0007rl-4Y for pgsql-general@arkaria.postgresql.org; Sun, 04 Aug 2019 22:39:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1huP9t-0006rQ-Vt for pgsql-general@arkaria.postgresql.org; Sun, 04 Aug 2019 22:39:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1huP9s-0006rC-UJ for pgsql-general@lists.postgresql.org; Sun, 04 Aug 2019 22:39:21 +0000 Received: from mail-oln040092007042.outbound.protection.outlook.com ([40.92.7.42] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1huP9n-0006Xe-Vn for pgsql-general@postgresql.org; Sun, 04 Aug 2019 22:39:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iof7vfikrvrO53KnJ+Mon3OmWPqYE5aAOjdy8m2WS+opVZjXUcnrJL5VPMs4+/nLSSd+hDbjCqLCAI0cpeNgk07umfZ+BL6A66Stya1Ci3m6f+rfApIsPDlI51oH4GJFp/60xltXo1he8FovYtTILCiPK22rZoyOJmEiNZDUVFWf30niuGaDX5RS9AvCSMaYv921FoL4DsC9evtD8ZkBGb6TtY/8g3EOlpfLxnQF/rwWXMudd7VyiRiAjMCZ/iYcWcF1W67+iIQljqGAAQ5xxNCsybufAhnkTFnq4W1V86lf/hOH+UVcESzhxF8Am28Q1yi51XORdLdZaW/3H53LLQ== 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-SenderADCheck; bh=e/H7u3WLw45F81dCkGjtUrtVQAjGFhkixsLiOrLYW2Y=; b=DDzRgO0eggySmdl7Ckl8WuD4TLPlnxIVdZu0TESfDL6KybCpawKRW9jcsL/E0FAn9y8Ptp0dMwFJFXu8bhBwG1eWIA/9hDLatVJ3X6752qDf/Wauh+pFcBkOzJuJl4OblkTLviZBdff+AJAYwAerFOs8HNyJhcdbHkCX01+ilGcHRSDbGJVPqcmZxhjH6oRdOdflnOeHTc6Ia+EMNAAkKS3j9cVfdzusnQW3V3lBuFbiWxDQQvaVaf9/DPe8Z63ALS7VWO5pxTyqeLkDPuCrWKULvl/xt0NPsgHg20+Mefl+hqOqR5p2qQ885kWgRlfP7Owo2Z+6acJrEx2z+p9mDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=none;dmarc=none;dkim=none;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e/H7u3WLw45F81dCkGjtUrtVQAjGFhkixsLiOrLYW2Y=; b=t3Dls+qPZR+Lb/3n4cbCIoJYzIDVd0htSN3jS9l0U2Ee74+c6VgiOpfpvBENQ+criEGm7NlJRFH1xQDAhZxHcqdckRzTc2iuTBFrTt9Ww75mwbGh8CzowWiH6lxUoRGNNIczzfXVnw/JWWHaJi9LVBHgLi4amfq5jee3bKwK8dZSRfL3Vnt8k7hnxGquqi2wSiulon7lfTEyDWx4P9uDhxYRcm6RnE3nP68M62GUoVt2w6OLsl7Im5CrIViUGTmOnw5DOuLfUlHXNdz0s7GZZEvrwmrs0h8NKmbm5bS2nG0SGnUJty6JLqyd8GFIOrZbjG7S9+jb9pnXtqyaLAn1xQ== Received: from DM3NAM03FT030.eop-NAM03.prod.protection.outlook.com (10.152.82.51) by DM3NAM03HT167.eop-NAM03.prod.protection.outlook.com (10.152.83.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2136.14; Sun, 4 Aug 2019 22:39:13 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com (10.152.82.52) by DM3NAM03FT030.mail.protection.outlook.com (10.152.82.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.14 via Frontend Transport; Sun, 4 Aug 2019 22:39:13 +0000 Received: from BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::14bd:c37b:f3b4:ccb1]) by BYAPR08MB5014.namprd08.prod.outlook.com ([fe80::14bd:c37b:f3b4:ccb1%4]) with mapi id 15.20.2136.018; Sun, 4 Aug 2019 22:39:13 +0000 From: Julie Nishimura To: Alban Hertroys CC: Adrian Klaver , "pgsql-general@lists.postgresql.org" , pgsql-general Subject: Re: adding more space to the existing server Thread-Topic: adding more space to the existing server Thread-Index: AQHVR+47+VDkybsuokiFFImEHrXsTKbmWwwAgAHkX+uAAPmYAIACYfYt Date: Sun, 4 Aug 2019 22:39:13 +0000 Message-ID: References: ,<13358DF7-5700-44A2-A86B-2A3721AA9650@gmail.com> In-Reply-To: <13358DF7-5700-44A2-A86B-2A3721AA9650@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:2D93A61ACB9CF27A077D3B9A0780DCECEFA202040D52C60B16BC8A4548EA174F;UpperCasedChecksum:1EB76A4A94F29F43B305140101AB9A554ABEC6048E1D1026A6CA87EE719A3C07;SizeAsReceived:7229;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [cLFptfJzJe4cFbcjv0tkZhJy+T9p4CgBIhW6wESCY3TWW6udnEK+DkIVXHWiNu+h] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(5050001)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031322404)(2017031323274)(2017031324274)(1601125500)(1603101475)(1701031045);SRVR:DM3NAM03HT167; x-ms-traffictypediagnostic: DM3NAM03HT167: x-microsoft-antispam-message-info: co3LGisxOppQ87rQioOARyRrbkBB+bg6eZQQL0ry5nft5LqGLelYRlWQT4x9xj4+29idAb+c2qh+6WfCI7kUC2QwV24dPs1LHAT15SgS20psgCzzG2o/8ZvhvDrtV37QP98/1auFvlzWWAIQfbN3v8EwUxZibFpnUmoWqTv994PUXrCxUwcQCWSuTCxydGd1 Content-Type: multipart/alternative; boundary="_000_BYAPR08MB5014D1F3B0F81D2584AB96CFACDB0BYAPR08MB5014namp_" MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 04003aae-bd45-4f07-0794-08d7192c9354 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2019 22:39:13.6248 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3NAM03HT167 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_BYAPR08MB5014D1F3B0F81D2584AB96CFACDB0BYAPR08MB5014namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Alban, thank you for your reply. Your suggestion makes sense, and I will be= talking to our engineers about it. Currently we need to understand: a) How do we break A -> B replication such that both can become indep= endent primaries b) How do we reassign C from B->C replication to A->C replication c) Thoughts on why this isn=92t a good plan Current: A replicates to B all requests go to A Soon: A replicates to B -> cascading to C and D Transition: break A replication to B such that both can become primary stop B replication to C then setup A to replicate to C End state: A replicates to C B replicates to D we remove some of the dbs from A and B, then reassign the traffic based on = db selections I hope it all makes sense... Thank you ________________________________ From: Alban Hertroys Sent: Saturday, August 3, 2019 3:15 AM To: Julie Nishimura Cc: Adrian Klaver ; pgsql-general@lists.postgres= ql.org ; pgsql-general Subject: Re: adding more space to the existing server > On 2 Aug 2019, at 21:45, Julie Nishimura wrote: > 1) We use streaming replication, and due to hardware limitation, we canno= t add more drives to the existing host. That is why we thought by breaking = the existing streaming replication (from a->b), instead of currently identi= cal standby (b), we can introduce twice larger host, then start the replica= tion to the newly larger host, and when it is caught up, break it again. Th= en break rep again, make modification to 'a" host, making it larger, then r= eplicate b->a. After it is caught up, break the rep again, switch master->s= tandby (if necessary). Let=92s be clear, I=92m in no way an expert on replication. In fact, I=92ve= only done (streaming) replication once and I managed to mess that up in a = minor way (disabled the wrong service during failover, so data still went t= o the database I was attempting to replace for, like, 15 minutes). > 2) I am not sure about the time, but it is understood it is required 2 fu= ll replication cycles, and might be up to 2 weeks with no standby situation No standby situation? Murphy is probably just waiting for that to strike=85 I recall a fairly recent story on the FreeBSD ML about someone on Malta doi= ng a migration of a couple dozen terabytes from her main server (because of= some failing disks in her RAID set) using her backup server to move data a= round (with backups removed to make room), when, due to an accident outside= the building, an aerial 10KV power line hit another power line in the grou= nd, causing a fire in one UPS and frying the other one. Losing power at tha= t point meant that the file systems (ZFS) on both servers ended up in an un= recoverable state with no backups. It didn=92t help that the UPS=92s were a= t the bottom of the rack, with the heat and smoke going up into the servers= . What are the chances, right? (And then it turned out that it is really ha= rd to try to recover data from a ZFS file system in such a state, which is = what her actual inquiry was about) I would definitely prefer to add a 3rd machine into the mix, even if it wer= e just a temporary machine - a rental perhaps?