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 1vlD4l-008ske-27 for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 21:27:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlD4i-003xQG-2h for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 21:27:45 +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.96) (envelope-from ) id 1vlD4i-003xQ4-1T for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 21:27:44 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vlD4g-002o7B-0a for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 21:27:43 +0000 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-50299648ae9so26451cf.1 for ; Wed, 28 Jan 2026 13:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769635662; cv=none; d=google.com; s=arc-20240605; b=TPcVT0SPgswsLQ6vf6VRLWkfGMKCWeu/DyxtKHcOuZjl2S421ByF9kEPJunH2C7nfQ qILddqxVML8z2LeZ2AfR2vnOX0oaZM5xJoIao0Z+cDGwtc6Kib2Q8nVXybYamVLHjzcI q+PFz61FDuLNJafm5lzhJA6PYSssyuMB9RWPY1AdLooyBxqyBSEmSKPtyqgtkN4PaI1V CHbisHW6RF685ewQyvNuMQPE5DQxZfJdGzzXaNJGWgHkkUGxA5zkx6prD1/7fyBmEqFO Pik8L+rHvn3CBCSM/oPkjeUBw+r74zGzEMXB01cOQDCrjzA254LJzQv9xK6UbXXHYhc7 Y2Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Jc92wR/jBneXA0w9kw195utDlVPFd3ZR3/nOKM26kCo=; fh=W6Cp6h0kZ0Q/bp0nX1nQ1zxgKjuHfFkupE1LtB5ZIcc=; b=L5erogfuUJaqaAWTeb68b9oZFUT371NfHydHChTsvweZSBhrNTkgF7vsvkZEd/ASmU 0XL0a4uWYIoxfBd6zD2zVWHbRgo61PsEXrFjCPWIKIFnsPLFTMnvcpnEkANmQz0H1bvB DvdZjpNAYBCOvDCGA4GbiIMztTdSPbVnXuZ7XIKZ2lKjAPVNWeAtZtXcaKYDrWMRWHRI PeF8L3b+dsQVgumF4RZANwZHEA0AY1Z56WZcJo5TaW3aQFdNcCXjluFcr+n+6UB0aQkF 3euvb15JbWh88k222NU/1AhYCDi6cX0BDV/gJr3BcZCZKz8XQl4Xxr5bhAHlKm89mn57 3DuA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769635662; x=1770240462; 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=Jc92wR/jBneXA0w9kw195utDlVPFd3ZR3/nOKM26kCo=; b=28CVHrb8/TuSoezMyOrsBW4nmABFNm/s1+ijPxvDOPi/3eTz31zTBTnHkNrAlnMQRg dRYZFZ5yRnfXUM97U2wo1fFj8lU9uAzQa85P5AqSiGMjmqbc8DQ/oR88+xSvTaQ1Utf1 j7ZhzYubooA450XUXiUfhDw95yNf/41OLg3L7esrl3vpFSsEs2DCYhmta7Kn657ATWFX v5bk2f1KqwLYJ6vm+4u5sxk3Ym3cpMsOYV5cXpUIUcRtW8FsigF7g5favN1aBQtzIJij kwI3ua6S3MDKltzw8UkfecJocfDRvpXFg7SFMeVfeDgpjS6Lrwgy36tZFm/dlWReYi/Y vhFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769635662; x=1770240462; 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=Jc92wR/jBneXA0w9kw195utDlVPFd3ZR3/nOKM26kCo=; b=F+eZx1/IBG5Hq9QgwjR8DpJwG6OQBUhnnt9Nw17M6A/dbSJ6x8/v/1XijgH8vGLpp0 RLfYijFNQ/sU+6d9VRI5c8S8BGZWQqtz56PBfNOXWoRYa2rNeI67KKCOCUSjv74TGG+E Dw/BLlhpx7HpAckQClAtpxDT++KU+2KFqWGxiB2TPLbgY8lqHVQNRkRT0hYy2tIJ0oo+ JY76CwQWeS0msLkOR3KsANb5ydyuByq4/De6vyRJqivfkLTK8XP0o9A+ZNFj49yd4Lr8 ifhrPOFyU9WT9ce+mjKdHA5qza+2zkysAByy2FP5gT87UZd5I6FA6kdnRQ5og2ljxhiM ZnEg== X-Forwarded-Encrypted: i=1; AJvYcCVMICooS4hI7D2S4aV/B62tBbQqMSwZTEmb1ftX1lmvgjXir8SJckmDIcruTmvtB8cJ/mlGWNWpz7N8hlR7@lists.postgresql.org X-Gm-Message-State: AOJu0YyBxyL5IwGXRhSgf89CPMv2IAksWdKeMzh7TOuUS5nmQjZlZLGa 68q52CCJF8uJ4S0V2tKJqMFqAIUqURI7ak4SKSsQkILZAjf1WDB/1/WzOZvEuJzGWO/D25HH3mQ 98NqsffEEkVlFks6Eh62bupDnkw+WgOfojeqpLrgl X-Gm-Gg: AZuq6aK4NdRQmRgMdVqHL8m/9t5ACY5aervEbBiAXqXgEzsTHQQi1DU14j7v/4qyN6r r4GJRQl1w//IT4otI3vFsUJGG1aT+HJnrM0a79xj/pZ5yvI43+kM9e/2qFiL+wPMqXmMYN7CuhE 8zXkc1HBAQILHdJNw5pAgi7BTWkhXSBP0HDwW3DJ6WrSXEm2ay54aXRKCMyUy0yg0XZdCCVOMnE csbNf7OvpaHqVyvPiWC/hd6gLLZ3qJnLr7vqLQ70qNVyT6glsZ3rj100z7EKpj+qzcztw== X-Received: by 2002:a05:622a:5ca:b0:4ff:cb25:998b with SMTP id d75a77b69052e-503b6728cc0mr2581861cf.12.1769635661868; Wed, 28 Jan 2026 13:27:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Hannu Krosing Date: Wed, 28 Jan 2026 22:27:30 +0100 X-Gm-Features: AZwV_Qjo9EkwRi-L9aN2xz-IXvdSj_vrkO2tx8imx8qvK1RS-IZYlwQtpPxDv-g Message-ID: Subject: Re: Patch: dumping tables data in multiple chunks in pg_dump To: David Rowley Cc: Zsolt Parragi , Ashutosh Bapat , 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 Hi David About documentation : On Fri, Jan 23, 2026 at 3:15=E2=80=AFAM David Rowley = wrote: > > Aside from that, nothing in the documentation mentions that this is > for "heap" tables only. The part did mention it and even gave an example Dump data in segments based on number of pages in the main relation= . If the number of data pages in the relation is more than npages the data is split into segments based on that number of pages. Individual segments can be dumped in parallel. The option is applied to only pages in the main heap and if the table has a large TOASTed part this has to be taken into account when deciding on the number of pages to use. In the extreme case a single 8kB heap page can have ~200 toast pointers each corresponding to 1GB of data. If this data is also non-compressible then a single-page segment can dump as 200GB file. Would it be a good idea to add a 2nd paragraph like this to make it even more clear ? It is also possible that segments end up with very different sizes even when no TOAST is involved, as there is no guarantees that pages are not unevenly bloated in a real production database up to a point where some pagese may have no live tuples in them. --- Hannu