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 1uPhpl-00E38J-C9 for pgsql-admin@arkaria.postgresql.org; Thu, 12 Jun 2025 13:19:09 +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 1uPhpj-00CRLl-At for pgsql-admin@arkaria.postgresql.org; Thu, 12 Jun 2025 13:19:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::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 1uPhpi-00CRLd-SC for pgsql-admin@lists.postgresql.org; Thu, 12 Jun 2025 13:19:07 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uPhph-001bok-2i for pgsql-admin@postgresql.org; Thu, 12 Jun 2025 13:19:06 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-2d0920ce388so413484fac.0 for ; Thu, 12 Jun 2025 06:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749734344; x=1750339144; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=WUL74Ig3qTiWrMFeAutVPqhHlHMYwNmX6RWlB8CQoKA=; b=A/P99sJOfbdP3whUlcJ31LOV72YKyNk0K582i4kSWK6YbbLM66xhELsXZfeQnVp80D 9IyDhKnwg64c7sqF5+NswE17K61OKiuGTh+otkwbpBmfdGC61BNRSePgEshTUSAFH801 6NKsv0vXywgGmHrHDlUmBsSCKMyaZdxCtetIRMij9f68FAfgfCx8ha+Gk/KCmes2AIJV MCMraVibaFOpbp8/woeDxUNHwtuayt9iHpYFe2zQ5aCR9Qa2cODo/XkamsffPvoo/MYm n6iT/wDCB8LwFp8Pplrlkfw+YTmSFLOaxu2/d1nwpa0/Wg1Sp7s9CiQNNqS4TxmIobCb e8Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749734344; x=1750339144; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WUL74Ig3qTiWrMFeAutVPqhHlHMYwNmX6RWlB8CQoKA=; b=BfpsykgDvGi9Lgf0DXx5eJ+CwqCYwr+z8FVbh6uwBtp3J4ePyA6lflJK1tEPplt0FN ZPBySX62KkAspfw2hrjDYBq0PE6EFQ+ntZke1hk8ghtPqYOC93LKC4PbV1Rk23Op1E9d a5DivEjTDjGjXDyUsx9TwMj4UWuaK0iZZpvg2RAN8U8Alw5trjgvhGYC4a669OI2Sncx fX46fRjHkhu98z29oVw+af49voLSJ3Tih0w6AyImSrjeg9xJf0dIlc+MmNjN9lc0XMyZ WFJaONuYJ5MDB3k+kYGHZ2INBVBkK6Ew+5rdMZ6zmIunXlzyVp/lqw0gYxUzF1Rh0f6c 8Y+A== X-Gm-Message-State: AOJu0YybN8/Iwrd13dlqa1EWm50DSqQDyObnQ/5i2lkgEP9a8e6C70+v 4zetBXdP2jL0dgKJXoDFi+HHsdbTzerT8X2/Qczbt5csi2i11VhjKWZ9jIb/IO3/T+BG7yuo8v9 VOyrdVOdwp1eLmcS7pfGnrxQwS3QzDTltlLO/ X-Gm-Gg: ASbGncvpD1ZX0ufC1bPS6Kc1kMhjttu1LPxUmwww/bSu5q0mstUN5b3Q0K6cihlfc5r Mi3RFHWy+pUUDtTuGL4mHAgQ02pZk+G3+u+ZZmHSj4uus8uFGBwV9p3wfexBj0a83rDXXIYCF7K 4g8BwlRj/mVTs8QTA789Q7/FYR4pLgUTPrNWj1YCe0+o8HslwWxtnRuhI= X-Google-Smtp-Source: AGHT+IFB1IdtPtq/06vyJ9ZXrYA6HfysZZ3fmsRBr9rB6W+DZLsjlo018bU3vDQBeeVF77Y7TzFfAkhQvlWHKHTzi5w= X-Received: by 2002:a05:6871:cc86:b0:2b7:d3f1:dc72 with SMTP id 586e51a60fabf-2ea96f1eabamr4990593fac.29.1749734344229; Thu, 12 Jun 2025 06:19:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ron Johnson Date: Thu, 12 Jun 2025 09:18:52 -0400 X-Gm-Features: AX0GCFv8-Ydxx2q0hpesNHkAWIyU8paTXb92NcYJ7oCbtdH8ZPqstjHlgyIGUNw Message-ID: Subject: Re: PostgreSQL Upgrade (v9.5 to v12) with Django 2.0 To: pgsql-admin Content-Type: multipart/alternative; boundary="0000000000000a083b06375fc63f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000a083b06375fc63f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 12, 2025 at 7:30=E2=80=AFAM Kushal Shri = wrote: > Dear Community, > > We are in the process of planning a PostgreSQL upgrade and would greatly > appreciate any insights, best practices, or lessons learned from your > experiences. > > Current Setup: > - PostgreSQL version: 9.5 > - Django version: 2.0 > - Database size: ~3 TB > - One Master 4 Replicas(Streaming Replication) > > We are taking a phased approach to this upgrade. In Phase 1, our goal is > to upgrade PostgreSQL from v9.5 to v12, ensuring compatibility with our > current Django 2.0 application. > > As part of this, I would like to understand: > > - What is the highest PostgreSQL version reliably supported with Django > 2.0? > - What upgrade strategies or methods have worked well for you in similar > environments? > - Any gotchas or performance considerations to keep in mind with large > databases during such upgrades? > > Your recommendations and experiences will be extremely valuable in helpin= g > us plan and execute this upgrade smoothly. > If you have (or can add) 3-4TB on your existing server, then pg_upgrade to 12.22 is possible. (You can also do a hard-links pg_upgrade, but there's no going back once you start the instance with v12. That's why I like upgrading to a new disk.) A 3TB instance should take no more than a few hours (depending on disk and controller speed.)