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 1uULol-001sEC-8t for pgsql-performance@arkaria.postgresql.org; Wed, 25 Jun 2025 08:49:19 +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 1uULoh-001XIP-Uy for pgsql-performance@arkaria.postgresql.org; Wed, 25 Jun 2025 08:49:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uULoh-001XIG-Hf for pgsql-performance@lists.postgresql.org; Wed, 25 Jun 2025 08:49:16 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uULof-003zQJ-2f for pgsql-performance@postgresql.org; Wed, 25 Jun 2025 08:49:15 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-742c7a52e97so994375b3a.3 for ; Wed, 25 Jun 2025 01:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750841351; x=1751446151; 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=V+UyfPdM5pNx1xgEJSnYaKN7pdk4JFD8q/+kiCUIqss=; b=IKX3SfK+Q/5DQAsGb9c2HEfNO58T+ofHRN5EeIg4hZhPcoEhRRZgblkrhxI6otEXpw DXoxAaacvtqC9/1fVRr8PAcrLnL7z1aq1tPWnnVyHPO1FXd3f+8nvbb/oL2jDHc7EfAM L27sUBvRZ+F/gKrtb88APiL3U9G7AORGIzf+ML9Zhvbmnucc5kFi9JaRXsxQrNFtRbsO e60QUPSPAPfwy6mnazkV8DjyGu/Bvtt4gU6y/qpWYkXhbDTTj2xlVrIurxQ1qf5C0Rhl 3haQZjOJ7+3+baRM9l/Q+/ObrcV6RVPc+tLACA12Sjyl8xrzbM2CPO+NBWpz2PHWrFXM W8kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750841351; x=1751446151; 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=V+UyfPdM5pNx1xgEJSnYaKN7pdk4JFD8q/+kiCUIqss=; b=PzAO5mKsfHbbx5OsOPJTC/Om6xcRIbMQh6jHSry6dahYvcB9irWArF7I/Btu9QQm6R g/06iWENXg+oRXqnZ9QDIGNxOsdesbjCpUwL/MrfhPbASsRz3cbBSzmOcF/xNLnVLeGJ l1rTKy0Ssgx8moCdW6gFkGl+mSKt9Dw1Uusy9ZnlyuoNRdOQGYSM1SgCAoqyjqEfQsWP X+UAYekAr5w3CI22/TmPRdXOZC9sdWyZejvkc61uOQJyHCZzjDEm7GDPvixOqfwp/vA5 kyartvYuArqJF+kHZYnIkiRUnL4+bRtRx2S7AnTNOzY0FIyu+mED+ZCEvNDtP4K/9MYr Kh6w== X-Gm-Message-State: AOJu0YyyCpDryFUsqk31Kn1n7RiRuDzbsJW2bipDgE2LrcRzs7LOlbia GBg7KcIveROLmV8F68tAFF9R63OiHt1T3KbS08aEtfxnS9yOyHJGQq1tGJdjWXuY2ABA3XJAQu6 xKVN8dHxPffI+01M8vHOJ+djQfFmGjGkSpYDY X-Gm-Gg: ASbGncvMukt2RYY6v5ODws8kYx+FNypKu+gKBqow7HYw0aw3tk5vrlSqdt6XTPrVvDt ctiRid+u3s7XzHIFQ6KZu+X7j12VvjeKplPcy+BoGnmnLaL0PA8lOYUVMuG2yHYKdAGZS2upvtq WfIPO5lS4K7kej6DkNehk01cqtnxiR7FsC9xjggePRynZXkc4tho+NNrn0Ogf+qk8i776TZ2kam +zIzz0UbHDJaQ== X-Google-Smtp-Source: AGHT+IGQKhhprHDkDSVojwOmeflc0gIFwDqLzFM1phSuNNEF9uQa+zabZ80k3395qPxFFrF2rcPwiLDy8dAWvRa2r70= X-Received: by 2002:a17:90b:2891:b0:313:d346:f347 with SMTP id 98e67ed59e1d1-315f26c9eafmr3101064a91.35.1750841349111; Wed, 25 Jun 2025 01:49:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Motog Plus Date: Wed, 25 Jun 2025 14:18:55 +0530 X-Gm-Features: AX0GCFvYAyJyG7I9pbDXlYaJr9H21uKy0NurawOB3qL5jcSj2mxndyaOVZ_-Xw8 Message-ID: Subject: Guidance Needed: Scaling PostgreSQL for 12 TB Data Growth - New Feature Implementation To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary="000000000000ac41840638618426" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ac41840638618426 Content-Type: text/plain; charset="UTF-8" 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 PostgreSQL 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) connect 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 reaching *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 single PostgreSQL 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 database, "C," currently occupies 620 GB. It contains multiple schemas. We are considering splitting database "C" into two new databases: "C1" to exclusively 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 advisable to assign a new, separate database server for "C2," or could both "C1" and "C2" reside on the same database server? What 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 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 should we consider implementing to ensure optimal performance and manageability with such a large dataset? This could include configurations, maintenance 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 for 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 Citus Data) that the community recommends or has experience with for managing extremely large datasets? Any pointers or guidance on this would be highly valuable. Thank you in advance for your time and expertise. We look forward to your valuable insights. Thanks & Regards, Ramzy --000000000000ac41840638618426 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear PostgreSQL Community,

We are implementing a new feature in our applicatio= n that is expected to generate a significant amount of data, and we are see= king your expert guidance on how to best handle this growth within our existing PostgreSQL setup.

=C2=A0

Currently, our PostgreSQL instance runs on an EC2 c= 5.4xlarge Ubuntu instance with the following specifications:<= /span>

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

=C2=A0

Our database architecture utilizes a primary-standb= y streaming replication setup. Application modules (running in Kubernetes p= ods) connect to the database through Pgpool-II, using HikariCP for connection pooling.

=C2=A0

We have multiple databases on our primary server, w= ith their approximate current sizes as follows:

  • C: 620 GB
  • =
  • M: 225 GB
  • =
  • P: 59 GB
  • <= li class=3D"MsoNormal">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 gr= owth in size:

    =C2=A0

    S.No.<= /p>

    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

    =C2=A0

    =C2=A0

    We would greatly appreciate your insights on the fo= llowing points:

    1. Scalability for Large Datasets: Con= ceptually, PostgreSQL is known 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 database, "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 wi= th 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 Databa= se 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 Practices for Large-Scale Data Management: Beyond standar= d 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. Hardwar= e Configuration 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-source 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. W= e look forward to your valuable insights.=C2=A0

    Thanks & Regards,

    Ramzy=C2=A0

--000000000000ac41840638618426--