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 1uUmtA-008Y1n-BM for pgsql-admin@arkaria.postgresql.org; Thu, 26 Jun 2025 13:43:40 +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 1uUmt8-00CyVG-3M for pgsql-admin@arkaria.postgresql.org; Thu, 26 Jun 2025 13:43:38 +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 1uUmt7-00CyV8-Ae for pgsql-admin@lists.postgresql.org; Thu, 26 Jun 2025 13:43:38 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uUmt5-0046tm-0b for pgsql-admin@lists.postgresql.org; Thu, 26 Jun 2025 13:43:36 +0000 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-749068b9b63so790595b3a.0 for ; Thu, 26 Jun 2025 06:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750945414; x=1751550214; darn=lists.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=HsKKIiuUmogpZa909h/8Y2x9Vp29hHe81yGs2bnYSJU=; b=KPnQItfGBqG/U1cuLORXmuDiG7ZE8iIyXDI2BYD/+0fAerwyjp1QCVIXwfeQafGuQq 6C4yTRvfXx/dgT8hE9GAJ+CWK47Ym9iv0cMuSC0yau2OvEmP/9HvKs5iNnBeSoNTscv2 mPg8PCNR2nvLQFpnOrtFQ3LWsJWlc4EN32jsG6Deehx8Ukt6wzP+Es4mAbsFLWFw2sRy dJoHRoN/tszCM/3OMBTeSLKbOa6WAZiQ7l/iyKwo+U7ghtwsKa6l39SWMTxka0nkW/he yDJiBH7dkEM6UFT4Oe6QivngKCZQmJAFGpinzGWwgFAVoAZcEnnxCA7IAoAPfcVAglQb WA9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750945414; x=1751550214; 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=HsKKIiuUmogpZa909h/8Y2x9Vp29hHe81yGs2bnYSJU=; b=jOUR4FAhQa1fuVNioxjGKivQA+jQVPW5Ka4O9fR0h6CUC29wx6GhqtIseG44QehjR7 meilAEcd+kRlmo7YkLDA1JylXT/Nj2HTh4N5kWwACxKMN/ulMYxpw1wXcdUCp13cbI4P ObxQWhUcvjpMwJFlNPhK61apgQQgBxTkjrcELwXcLA9EXwz7exBf7NqP7cUZYixOTDxA AzEVwjgKI4W20xwbP8MY9ZcQ6dA0SsknDRtQxhy0BfifJr12iDaVbJzkRISmYlTghGbv 4LF2yTTUNyl7VjtS/xB75GsBwAanKINQDGga6NnWd2WtvU/fHaTc6VJWQw5VjG/5jbFi VFsg== X-Forwarded-Encrypted: i=1; AJvYcCVzLh75bsS6tglusIqjvuXlJtbKvibHBcWA4/KYrv9yYM8Fj4eSDvZIoDI32fnS8pR5XzMJrHvVZc1Hyg==@lists.postgresql.org X-Gm-Message-State: AOJu0YxLpwWuikLpmDxbC5+oXuh1XpzppZDa0UqdXvpvwUfMjC9Kj8jd 11zcB7FyJl8eJFFbVCFy71oCc+uQGZL+6UpyMaeJRa2keRkzC5tqB3hCrJmm+DqJDXkZ2CRhKce Y9j74H7S1ehvhknuEnhwDeQe9iB3rtdI= X-Gm-Gg: ASbGncuMeKCCfZ55K3yq1TFxG+mjkxMKMT050UhTlCM9tbhhAmAvnYoCXaUpo9wxYzI 3MZE7wRCwWM16/bMiuL4+9Xqq+vTQvBt7HeJBKPFJeaqDNuEku8JlEgb8TsOk6RbXePPVMPhZgN 19fExuFYDOKkWyKBP24FYjLDzVLkdvDVqKoOcFvzOyajS6xvKw9U9Fvt2V0+qch+3vSBSHuenGY FY= X-Google-Smtp-Source: AGHT+IGcm6Ex76bF4fx82NDf3RHCnjvAqQIVA55abWJuFrgwRHgxbjIFP+EgKYlwTaGq7INGbRCIDmlZmsinPl+Q3gg= X-Received: by 2002:a05:6a00:1989:b0:748:f6a0:7731 with SMTP id d2e1a72fcca58-74ae3329911mr5889189b3a.23.1750945413403; Thu, 26 Jun 2025 06:43:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Motog Plus Date: Thu, 26 Jun 2025 19:13:21 +0530 X-Gm-Features: Ac12FXzcIJtwY1VPOdOBxavBF77rohIZTRCaCCaMVteeovM4fNiLu4LPOAFWwEQ Message-ID: Subject: Re: Guidance Needed: Scaling PostgreSQL for 12 TB Data Growth - New Feature Implementation To: Ron Johnson , Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000633217063879bfac" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000633217063879bfac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Ron, for the feedback and for sharing your experience with PostgreSQL handling such large databases =E2=80=93 that's very encouraging = to hear. We are using postgres version 15.12. You're absolutely right about "typical transaction loads" not being a useful term without more context. My apologies for the vagueness. We actually have two distinct workloads on separate servers: OLTP: This is our primary transactional workload and has replication setup, pgpool - II Reporting/DW: This is for reporting purposes. The growth figures I initially shared (8-9 TB) were a more conservative estimate for OLTP. However, after a more focused rough estimate for our OLTP workload alone, we anticipate it could reach 35-40 TB of data over the next 5-7 years. Specifically for our OLTP databases (which I listed in my initial email): Database C could reach 30-32 TB, with the acc schema within it potentially growing to 13-15 TB. Database M might reach 5-7 TB. Database P could reach 1-2 TB. Given these revised, more detailed projections for the OLTP side, we would be extremely grateful for your and the community's guidance on all the questions we originally posed, specifically considering these new volume expectations for our OLTP workload: 1. Will PostgreSQL be able to handle this much load (35-40 TB, with one DB potentially at 30-32 TB and a schema at 13-15 TB) for an OLTP environment? 2. Should we still consider splitting our database "C" into two DBs (C1 for "acc" schema and C2 for the rest), given the projected 13-15 TB for acc alone? 3. Should we assign a new DB server to C2, or keep it on the same server, particularly now with these larger OLTP volumes? 4. Will a single DB server be able to handle 30+ TB of OLTP data, or is there a particular limit per DB server from a performance point of view for OLTP? 5. What are the best practices, apart from indexing and partitioning, to keep in mind for such large-scale OLTP data management? 6. What hardware configuration (RAM, CPU, storage I/O, storage type like NVMe) would you recommend for future OLTP database servers to efficiently handle these new projected sizes? 7. Is a horizontal scaling solution (open source, apart from Citus) possible in PostgreSQL for these OLTP volumes, and do you have any pointers on that? Thanks again for your time and invaluable guidance. We truly appreciate the community's expertise. Regards, Ramzy On Thu, Jun 26, 2025, 18:19 Ron Johnson wrote: > PG easily handles our 6TB database, as well as 3 and 5TB databases (all o= n > different VMs), and has done so since at least v8.4. > > Ours are on single LVM mount points, as are the disks that hold the > PgBackRest savesets. > > "considering typical transaction loads." > > Pfft...there are no typical transaction loads. Is this db OLTP, Reportin= g > or DW? > > On Wed, Jun 25, 2025 at 4:35=E2=80=AFAM Motog Plus = wrote: > >> Dear PostgreSQL Community, >> >> We are implementing a new feature in our application that is expected to >> generate a significant amount of data, and we are seeking your expert >> guidance on how to best handle this growth within our existing PostgreSQ= L >> setup. >> >> >> >> Currently, our PostgreSQL instance runs on an EC2 c5.4xlarge Ubuntu >> instance with the following specifications: >> >> - *RAM:* 32 GB >> - *Disk:* 1.2 TB >> - *vCPUs:* 16 >> >> >> >> Our database architecture utilizes a primary-standby streaming >> replication setup. Application modules (running in Kubernetes pods) conn= ect >> to the database through Pgpool-II, using HikariCP for connection pooling= . >> >> >> >> We have multiple databases on our primary server, with their approximate >> current sizes as follows: >> >> - *C:* 620 GB >> - *M:* 225 GB >> - *P:* 59 GB >> - *K:* 13 MB >> >> >> >> The total current size of our databases is around *1 TB*. With the new >> feature, we anticipate a substantial increase in data, potentially reach= ing *10 >> TB* over the next 5-7 years. >> >> >> >> Below is the table for current size and expected growth in size: >> >> >> >> *S.No.* >> >> *DB* >> >> *Current DB size* >> >> *Future DB size* >> >> *Schema Name* >> >> *Current Schema size* >> >> *Future Schema size * >> >> 1 >> >> C >> >> 1 TB >> >> 8 TB - 10 TB >> >> acc >> >> 297 GB >> >> 3 TB - 4 TB >> >> po >> >> 270 GB >> >> 2.6 TB - 3.5 TB >> >> pa >> >> 27 GB >> >> 270 GB >> >> pra >> >> 13 GB >> >> 130 GB >> >> fu >> >> 13 GB >> >> 130 GB >> >> te >> >> 167 MB >> >> 2 GB >> >> pro >> >> 30 MB >> >> 300 MB >> >> 2 >> >> M >> >> 225 GB >> >> 2.2 TB - 3 TB >> >> bi >> >> 82 GB >> >> 820 GB >> >> co >> >> 80 GB >> >> 800 GB >> >> ps >> >> 17 GB >> >> 170 GB >> >> qo >> >> 16 GB >> >> 160 GB >> >> to >> >> 7 GB >> >> 70 GB >> >> in >> >> 7 GB >> >> 70 GB >> >> di >> >> 6 GB >> >> 60 GB >> >> no >> >> 4 GB >> >> 40 GB >> >> do >> >> 4 GB >> >> 40 GB >> >> cl >> >> 3 GB >> >> 30 GB >> >> 3 >> >> P >> >> 60 GB >> >> 600 GB >> >> au >> >> 45 GB >> >> 450 GB >> >> fi >> >> 8 GB >> >> 80 GB >> >> con >> >> 4 GB >> >> 40 GB >> >> ba >> >> 1 GB >> >> 10 GB >> >> li >> >> 2 MB >> >> 20 GB >> >> >> >> >> >> We would greatly appreciate your insights on the following points: >> >> 1. *Scalability for Large Datasets:* Conceptually, PostgreSQL is >> known to handle large datasets. However, we'd like to confirm if a si= ngle >> PostgreSQL instance can realistically and efficiently manage 10-12 TB= of >> data in a production environment, considering typical transaction loa= ds. >> 2. *Database Split Strategy:* Our largest database, "C," currently >> occupies 620 GB. It contains multiple schemas. We are considering spl= itting >> database "C" into two new databases: "C1" to exclusively house the "a= cc" >> schema, and "C2" for the remaining schemas. Is this a recommended app= roach >> for managing growth, and what are the potential pros and cons? >> 3. *Server Allocation for Split Databases:* If we proceed with >> splitting "C" into "C1" and "C2," would it be advisable to assign a n= ew, >> separate database server for "C2," or could both "C1" and "C2" reside= on >> the same database server? What factors should we consider in making t= his >> decision? >> 4. *Performance Limits per Database and Database Server:* From a >> performance perspective, is there a general "limit" or best practice = for >> the maximum amount of data a single database server should handle (e.= g., 10 >> TB) and similarly general limit per database? How does this influence= the >> decision to add more database servers? >> 5. *Best Practices for Large-Scale Data Management:* Beyond standard >> practices like indexing and partitioning, what other best practices s= hould >> we consider implementing to ensure optimal performance and manageabil= ity >> with such a large dataset? This could include configurations, mainten= ance >> strategies, etc. >> 6. *Hardware Configuration Recommendations:* Based on our projected >> data growth and desired performance, what hardware configurations (e.= g., >> RAM, CPU, storage I/O, storage type like NVMe) would you recommend fo= r >> future database servers to efficiently handle 10-12 TB? >> 7. *Open-Source Horizontal Scaling Solutions:* Are there any >> open-source horizontal scaling solutions for PostgreSQL (other than C= itus >> Data) that the community recommends or has experience with for managi= ng >> extremely large datasets? Any pointers or guidance on this would be h= ighly >> valuable. >> >> >> >> Thank you in advance for your time and expertise. We look forward to you= r >> valuable insights. >> >> Thanks & Regards, >> >> Ramzy >> > > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! > --000000000000633217063879bfac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Ron, for the feedback and for sharing your experie= nce with PostgreSQL handling such large databases =E2=80=93 that's very= encouraging to hear. We are using postgres version 15.12.

You're absolutely right about "typica= l transaction loads" not being a useful term without more context. My = apologies for the vagueness. We actually have two distinct workloads on sep= arate servers:

OLTP: Thi= s is our primary transactional workload and has replication setup, pgpool -= II
Reporting/DW: This is for reporting purposes.
=C2=A0

The growth figures I initially shared (8-9 TB) were a more conservative= estimate for OLTP.

Howe= ver, after a more focused rough estimate for our OLTP workload alone, we an= ticipate it could reach 35-40 TB of data over the next 5-7 years.


Speci= fically for our OLTP databases (which I listed in my initial email):
<= div dir=3D"auto">
Database C could reach 30-32 T= B, with the acc schema within it potentially growing to 13-15 TB.
Database M might reach 5-7 TB.
Databas= e P could reach 1-2 TB.
=C2=A0

Given these revised, more detailed projection= s for the OLTP side, we would be extremely grateful for your and the commun= ity's guidance on all the questions we originally posed, specifically c= onsidering these new volume expectations for our OLTP workload:

=C2=A0
1. Wi= ll PostgreSQL be able to handle this much load (35-40 TB, with one DB poten= tially at 30-32 TB and a schema at 13-15 TB) for an OLTP environment?
=

2. Should we still consider s= plitting our database "C" into two DBs (C1 for "acc" sc= hema and C2 for the rest), given the projected 13-15 TB for acc alone?

3. Should we assign a new DB= server to C2, or keep it on the same server, particularly now with these l= arger OLTP volumes?

4. W= ill a single DB server be able to handle 30+ TB of OLTP data, or is there a= particular limit per DB server from a performance point of view for OLTP?<= /div>

5. What are the best pra= ctices, apart from indexing and partitioning, to keep in mind for such larg= e-scale OLTP data management?

6. What hardware configuration (RAM, CPU, storage I/O, storage type l= ike NVMe) would you recommend for future OLTP database servers to efficient= ly handle these new projected sizes?

7. Is a horizontal scaling solution (open source, apart from C= itus) possible in PostgreSQL for these OLTP volumes, and do you have any po= inters on that?
=C2=A0

Thanks again for your time and invaluable guidance.

We truly appreciate the c= ommunity's expertise.

Regards,
Ramzy

On Thu, = Jun 26, 2025, 18:19 Ron Johnson <ronljohnsonjr@gmail.com> wrote:
PG easily handles our 6TB databas= e, as well as 3 and 5TB databases (all on different=C2=A0VMs), and has done= so since at least v8.4.

Ours are on single LVM mount po= ints, as are the disks that hold the PgBackRest savesets.

"considering typical transaction loads."

Pfft...there are no typical transaction loads.=C2=A0 Is this db OL= TP, Reporting or DW?

On Wed, Jun 25, 2025 at 4:35=E2=80=AFAM Motog Plu= s <mplus7535@gmail.com> wrote:
Dear PostgreSQL Community,
<= div lang=3D"EN-US">

We are implementing a new feature in our application that is expe= cted to generate a significant amount of data, and we are seeking your expe= rt guidance on how to best handle this growth within our existing PostgreSQL setup.

=C2=A0

Currently, our PostgreSQL instance runs on an EC2 c5.4xlarge Ubun= tu instance with the following specifications:

  • RAM: 32 GB
  • = Disk:<= /b> 1.2 TB=
  • vCPUs: 16

=C2=A0

Our database architecture utilizes a primary-standby streaming re= plication setup. Application modules (running in Kubernetes pods) connect t= o the database through Pgpool-II, using HikariCP for connection pooling.

=C2=A0

We have multiple databases on our primary server, with their appr= oximate current sizes as follows:

  • C: 620 GB
  • <= span style=3D"font-size:11pt;font-family:Calibri,sans-serif">M:<= span style=3D"font-size:11pt;font-family:Calibri,sans-serif"> 225 GB=
  • P: 59 GB
  • K: 13 MB

=C2=A0

The total current size of our databases is around 1 TB. With the new feature, we anticipate a substantial increase in = data, potentially reaching 10 TB over the next 5-7 years.

=C2=A0

Below is the table for current size and expected growth in size:<= u>

=C2=A0

S.No.

DB

Current DB size

Future DB size

Schema Name<= /b>

Current Schema size=

Future Schema size

1

C

1 TB

8 TB - 10 TB

acc

297 GB

3 TB - 4 TB

po

270 GB

2.6 TB - 3.5 TB=

pa

27 GB

270 GB

pra

13 GB

130 GB

fu

13 GB

130 GB

te

167 MB

2 GB

pro

30 MB

300 MB

2

M

225 GB

2.2 TB - 3 TB

bi

82 GB

820 GB

co

80 GB

800 GB

ps

17 GB

170 GB

qo

16 GB

160 GB

to

7 GB

70 GB

in

7 GB

70 GB

di

6 GB

60 GB

no

4 GB

40 GB

do

4 GB

40 GB

cl

3 GB

30 GB

3

P

60 GB

600 GB

au

45 GB

450 GB

fi

8 GB

80 GB

con

4 GB

40 GB

ba

1 GB

10 GB

li

2 MB

20 GB

=C2=A0

=C2=A0

We would greatly appreciate your insights on the following points= :

  1. Scalability for Large Datasets: Conceptually, PostgreSQL is kno= wn to handle large datasets. However, we'd like to confirm if a single Po= stgreSQL instance can realistically and efficiently manage 10-12 TB of data= in a production environment, considering typical transaction loads.=
  2. Database Split Strategy: Our largest databas= e, "C," currently occupies 620 GB. It contains multiple schemas. We are considering splittin= g database "C" into two new databases: "C1" to exclusiv= ely house the "acc" schema, and "C2" for the remaining = schemas. Is this a recommended approach for managing growth, and what are the potential pros and cons?
  3. Server= Allocation for Split Databases: If we proceed with splitting "C" into "C1" and "C2," would it be advisabl= e to assign a new, separate database server for "C2," or could bo= th "C1" and "C2" reside on the same database server? Wh= at factors should we consider in making this decision?=
  4. Performance Limits per Database and Database Server: From = a performance perspective, is there a general "limit" or best practice for the maximum amou= nt of data a single database server should handle (e.g., 10 TB) and similar= ly general limit per database? How does this influence the decision to add = more database servers?
  5. = Best Practice= s for Large-Scale Data Management: Beyond standard practices like indexing and partitioning, what other best practices should= we consider implementing to ensure optimal performance and manageability w= ith such a large dataset? This could include configurations, maintenance st= rategies, etc.
  6. Hardware Configuratio= n Recommendations: Based on our projected data growth and desired performance, what hardware configurations (e.g., R= AM, CPU, storage I/O, storage type like NVMe) would you recommend for futur= e database servers to efficiently handle 10-12 TB?
  7. Open-Source Horizontal Scaling Solutions: Are there any open-s= ource horizontal scaling solutions for PostgreSQL (other than Citus Data) that t= he community recommends or has experience with for managing extremely large= datasets? Any pointers or guidance on this would be highly valuable.

=C2=A0

Thank you in advance for your time and expertise. We look forward= to your valuable insights.=C2=A0

Thanks & Regards,=

Ramzy=C2=A0



--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobs= ter!
--000000000000633217063879bfac--