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.96) (envelope-from ) id 1vKqeS-00AmWc-1k for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 04:15:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vKqeQ-00C6Gf-0p for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Nov 2025 04:15:38 +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.96) (envelope-from ) id 1vKqeP-00C6GX-34 for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 04:15:37 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vKqeN-0088Y0-2d for pgsql-hackers@lists.postgresql.org; Mon, 17 Nov 2025 04:15:37 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5942e61f001so3845097e87.1 for ; Sun, 16 Nov 2025 20:15:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763352934; x=1763957734; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=79ilYv0pnbXi/qPs3zWeAZLHPcq0BuYZXRn8sSZ9Uc8=; b=CXPxY4d8m2yCiQ2Wlp4Nucg8+o4UR6eFjTJYzodDro1KHyCSPPmPz3ReC/NIfhB1/b HSHqo8wRJOTjazIgRxHHs12vFtY9HYqVoYYzvwg4VupjERnCmPJTkmBphl91zkA3ZLRD xV8yQYiYNwrn0ha4Or0+0IUKWH99iGPwTZEH7fEEHaINSPy78ssLVxHr7Nq1OE2sUPz8 FBHa6k+97/lX/jicGcusILPEVuz1cLAIKUhzvNLYTONRoLQHG8WGYzav6k66dHQi4e9Z bMbFqr0um9O0w4kpjj9M4MUKJS7AkHTYxOmm0O6LwPjveFie6ol9pTkcaBU570UrEzP0 bhHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763352934; x=1763957734; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=79ilYv0pnbXi/qPs3zWeAZLHPcq0BuYZXRn8sSZ9Uc8=; b=Oa80VhKH64dtgVpzlBdwn0Wa5wgT4NZYrEqcU/KbFS0bRZgaW0RqWAlj40pC11NNgw AM3HaEOcP5zZuKVrT2FQyiBPJJazZaqFdK5VMnBce6zy4EMPNWBXWeGjVPsrC1+Rvxmy wuG0L6ScX3EaPSeWqRfS4PgHtDMZrm8l3Fj43bbsfruEAftbSHKOPoKdrXpVAsG9qaef 31ajVPZe6Kg9q52fSidgPjJrdMFXdDk8StVL3Qvi7Vs/Lo5wF40TE0M8ddcxOMOOPUit T64NJBcdtxBgrukz4aKHZP+UedyEl8clz+Hy/+jgu8Km/yr13gBxzttrLCj4DHBYMoYZ 7VUA== X-Gm-Message-State: AOJu0YymcN8nHgpFKWAVN/EeTb5bA+a6a1336XU7WwtLAFfrgd8FjGDB JDC7GUsliLi2Gr8XCQRyUb5oLqg3FHoj4JN4U+udATUCOrVIEnX118mBpMyPlS5SYRW/vfU2GQm Req7qyxyyIZ98WnLQ9LAxfDySsKLl9Fk= X-Gm-Gg: ASbGncvki2UtmGiOVtwow+0MfiCGIWkDDDI77XHSVAPEXmfasxtSwUcxinJo1jmHXDo TL/dwke6F5tsVnCPreQcEMd46Y0IPphfWTkTcsXXi/k816kTuAVfrE3OdkRpddbXILg7Y8b5+IA 0RArzZ98G4LyjPvehu4wj8g9JtdWBskeOhPM8bvSMYihHhnDTLt03WICQ9xNv/yHft90gz28otU xQQrv7/3IaR1R9z1gis5ghJiCKEkQBLSo0m2Vxww30quCrITF8hnE/NfzDl4ibDRJj3mjf1Kbak jXrF8DiH5s7tWn0iaA1EX9bFy/PZLQ+XLw== X-Google-Smtp-Source: AGHT+IEEx9l8MFO506Pj59e7+sDMC7fie+ZpN6+bsnC8E49keoRC0t7SW66QVSM4pG+CUQi0v/+MhYClWg3mBoUygM0= X-Received: by 2002:a05:6512:3093:b0:595:7bc3:133d with SMTP id 2adb3069b0e04-5958419f981mr4139681e87.11.1763352933578; Sun, 16 Nov 2025 20:15:33 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Mon, 17 Nov 2025 09:45:17 +0530 X-Gm-Features: AWmQ_bnQ74UK8amdqMqaLjqAW6Vl-dhhzZseSPC7VxBV_AuaMSBuVpORuH1sQb4 Message-ID: Subject: Re: Patch: dumping tables data in multiple chunks in pg_dump To: Hannu Krosing Cc: PostgreSQL Hackers , Nathan Bossart Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Nov 11, 2025 at 9:00=E2=80=AFPM Hannu Krosing w= rote: > > Attached is a patch that adds the ability to dump table data in multiple = chunks. > > Looking for feedback at this point: > 1) what have I missed > 2) should I implement something to avoid single-page chunks > > The flag --huge-table-chunk-pages which tells the directory format > dump to dump tables where the main fork has more pages than this in > multiple chunks of given number of pages, > > The main use case is speeding up parallel dumps in case of one or a > small number of HUGE tables so parts of these can be dumped in > parallel. > +1 for the idea, I haven't done the detailed review but I was just going through the patch, I noticed that we use pg_class->relpages to identify whether to chunk the table or not, which should be fine but don't you think if we use direct size calculation function like pg_relation_size() we might get better idea and not dependent upon whether the stats are updated or not? This will make chunking behavior more deterministic. --=20 Regards, Dilip Kumar Google