public inbox for [email protected]  
help / color / mirror / Atom feed
From: Kushal Shri <[email protected]>
To: [email protected]
To: [email protected]
Cc: Laurenz Albe <[email protected]>
Cc: [email protected]
Subject: Re: PostgreSQL Upgrade (v9.5 to v12) with Django 2.0
Date: Sun, 15 Jun 2025 15:50:27 +0545
Message-ID: <CAMSJNCVfYATtRBkjAP-egVcP_sepTSEp9=_YLf5EL4Z0L0B4HA@mail.gmail.com> (raw)
In-Reply-To: <CAGEDDz-9uaYihyW5hWYXj2XU+4khxQx+S9yJk5pnf-=+brMueA@mail.gmail.com>
References: <CAMSJNCXWkhYQ=YwSt+SQLT710+8KL3rRyb7Wo-fUerbr5o3idg@mail.gmail.com>
	<[email protected]>
	<CAGEDDz-9uaYihyW5hWYXj2XU+4khxQx+S9yJk5pnf-=+brMueA@mail.gmail.com>

Currently, our plan is to test pg_upgrade using the --link option to
upgrade from PostgreSQL 9.5 to 12, then upgrade Django to the latest
supported version, and finally perform another pg_upgrade to PostgreSQL 16.

Since Django 2.0 is officially tested and supported only up to PostgreSQL
10, would you recommend upgrading to PostgreSQL 10 using pg_upgrade as the
first phase, followed by logical replication to PostgreSQL 16 as the final
target after upgrading Django as well?

and, if we use the --link option for pg_upgrade, what would be the rollback
plan in case issues arise during or after the upgrade?


On Sat, 14 Jun 2025 at 01:59, Eduardo Barbachan <
[email protected]> wrote:

> I'm sorry if this part of the answer should not be given in this context,
> but I happen to be in this list (as a lurker for most of the time) and be a
> Django user.
> Till Django 4.2 (LTS) postgres 12 is supported. Django 5.2 (LTS also)
> supports postgres 17+.
>
>
> Em qui., 12 de jun. de 2025 às 10:19, Laurenz Albe <
> [email protected]> escreveu:
>
>> 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
>> 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.
>>
>> That's already wrong.  PostgreSQL v12 is out of support.  Upgrade to v17
>> or v18.
>>
>> > As part of this, I would like to understand:
>> >
>> > - 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
>> databases
>> >   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
>>
>>
>>
>
> --
>
> Att.
>
> Eduardo  Barbachan
>


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: PostgreSQL Upgrade (v9.5 to v12) with Django 2.0
  In-Reply-To: <CAMSJNCVfYATtRBkjAP-egVcP_sepTSEp9=_YLf5EL4Z0L0B4HA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox