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 1uPhqI-00E3No-Ee for pgsql-admin@arkaria.postgresql.org; Thu, 12 Jun 2025 13:19:42 +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 1uPhqG-00CUtM-JU for pgsql-admin@arkaria.postgresql.org; Thu, 12 Jun 2025 13:19:41 +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 1uPhqG-00CUtE-91 for pgsql-admin@lists.postgresql.org; Thu, 12 Jun 2025 13:19:40 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uPhqF-001bpJ-0z for pgsql-admin@lists.postgresql.org; Thu, 12 Jun 2025 13:19:40 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-451ebd3d149so6047525e9.2 for ; Thu, 12 Jun 2025 06:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1749734378; x=1750339178; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=qfEReeMLv1I7I+DsyblZP++/equVs3rPfgJTGKojD9s=; b=aAiiduUHL1EBuo4YUnb1hWD6G0QlWK44ZZN3Zm1LN0k7RtYMmhDBFO+LZXBJ/P7Sit ox0LGtxZaLEzMawk87Qq2RyfRM2OOZzfkZ+JZ2ajFzBBh4d9EoMNCjSc7IkmMRqGbOAN 0RBjnUykslf7CzYIzHFEsK7opHUBwk0ETI/PKS6QyCSbGcLBiExg1Ybh1eBEnS6a8vff 7ORD7sKn8/sumR5xMIbP3NI5uPPsaX+TLapYbFBGnN9IGO1W7U0aiftPHjn94M/4RBp+ G+U5Bm6J7ZbGp7Skqy9DyiXsjiHCryJaFb7H7JHHFH9/ysZgasbw6c9ISugpwOd0R/ht PxQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749734378; x=1750339178; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qfEReeMLv1I7I+DsyblZP++/equVs3rPfgJTGKojD9s=; b=RGpHrKt9zAt8Sw3MCQSi1sU1FI4RtIDXaLaZMokr7ox5IpgGDfULK1wUm0WYGRcWlA agxyr0gElLZyq6O7Ugx53YfzFzUbAGfApmNWXJwolX+r2jArwfwcw3aaMTAzCe/XPBLt Rv6u/Dbd51ftKYS6wPKd1uE1h9nl2WE+FAzM2or5N2jR98Hi2kMvGRjFEKZXImlDgK0v HQOPNkW0KDVSccZUG1fdy6a14it9U6Pm+Y5E7/eXiV6v6sCtica5CjRvnuIwyGFO2SK6 eQO79L34U3Ge+Hrf8L4N/5ILOwL4RWy/cWqfoQ81rklYPJbuN3vdkRAY/RzCuD24qqnF 39Ew== X-Forwarded-Encrypted: i=1; AJvYcCUjxghiVJnD+lnvnq62e3pScczDoAhcI/OWf/Pi2boESB8ftHeeAKwFuhwFHzqBqbOJ2KzZSQGPZJG0bA==@lists.postgresql.org X-Gm-Message-State: AOJu0YxD276IvZGgTjFEMUS7NKSygi6Wd2s+9Qcpk9MLxrqnUd/Z4cu0 jj+WWWNdqXP5oIFvt+07pnFyn/7Q7OaOXkywZ8My4+b9WDArf/8YMQH/6ZDTJjeDMKQ= X-Gm-Gg: ASbGncvuWua1Euoj3kMfQ68R1IUrwL/StD6bbix2PJ4nf3kTqKM4Br/v6vc7Lyw+30+ A8NGfbFhlbFyPu82dPlUr62yYsGpX3Dmrkd/VHZhj+FpPLMzFUSYQJoTfhd3dl8oFGKEpe3jvAf iMW58NK+gfZl6MGvsPlXuauqaGx8SRvfHnPTqUyhKoAna084L1R+jwzc1j4SnK34imKLn9ugGmx XaEi/SP+Uvj8GFMnHvLI5GBN+M/eCIPFKakE4N9yxrH2RTiAaJgD5QJOl8OfMLz/5u0FZfE7r4t dY9hGpovKYVS9NY16VXUoeVNOZxxYvE6fQMCxEMKJ8tR6pyvG7ARK7uuWRornu8EjRzK6WDnTNz uZdKoF1MCthq7ZPckSuJUOBGLjQM= X-Google-Smtp-Source: AGHT+IGhwmfO24zjS7uiE1d/pB78Co1Demd+MGkHLoOQ8QKZm/JLKDfmRySqXmb8O+WSla+yYzHO/A== X-Received: by 2002:a05:6000:310c:b0:3a4:f5f6:b4ab with SMTP id ffacd0b85a97d-3a561349f27mr2120526f8f.30.1749734377847; Thu, 12 Jun 2025 06:19:37 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:ea3b:b7db:9841:e1cf:f924]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a561b5be25sm1913114f8f.85.2025.06.12.06.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 06:19:37 -0700 (PDT) Message-ID: <61b6cfb6ae03b5ad6512d0d167a5cb409ae58f21.camel@cybertec.at> Subject: Re: PostgreSQL Upgrade (v9.5 to v12) with Django 2.0 From: Laurenz Albe To: Kushal Shri , pgsql-admin@lists.postgresql.org Date: Thu, 12 Jun 2025 15:19:37 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-06-11 at 16:39 +0545, Kushal Shri wrote: > We are in the process of planning a PostgreSQL upgrade and would greatly > appreciate any insights, best practices, or lessons learned from your exp= eriences. >=20 > Current Setup: > =C2=A0 =C2=A0- PostgreSQL version: 9.5 > =C2=A0 =C2=A0- Django version: 2.0 > =C2=A0 =C2=A0- Database size: ~3 TB > =C2=A0 =C2=A0- One Master 4 Replicas(Streaming Replication) >=20 > 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 curr= ent > Django 2.0 application. That's already wrong. PostgreSQL v12 is out of support. Upgrade to v17 or= v18. > As part of this, I would like to understand: >=20 > - What is the highest PostgreSQL version reliably supported with Django 2= .0? You'll have to ask Django what they support. > - What upgrade strategies or methods have worked well for you in similar = environments? pg_upgrade --link > - Any gotchas or performance considerations to keep in mind with large da= tabases > during such upgrades? Make sure you don't have millions of Large Objects, otherwise the upgrade will be very slow and memory consuming. Yours, Laurenz Albe