public inbox for [email protected]
help / color / mirror / Atom feedFrom: William Sescu (Suva) <[email protected]>
To: Laurenz Albe <[email protected]>
To: Raj <[email protected]>
Cc: Pgsql-admin <[email protected]>
Subject: AW: Size of /pgdata
Date: Wed, 17 Jun 2026 13:59:15 +0000
Message-ID: <GV0P278MB0244DE5A2049D0A42E471445E8E42@GV0P278MB0244.CHEP278.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <[email protected]>
References: <CAJk5Atb1v7=x-wsS-tL7Lxs7yXQy8Ng-GhXG+zzZ1gVAx=Xzjw@mail.gmail.com>
<[email protected]>
<CAJk5AtburOY2ugaH-6+8OHgOBwyyaq1V3LLozCAf57c5jtmR+w@mail.gmail.com>
<[email protected]>
<CAJk5AtZfFBqLfKyz7rAqJOXT0ZvEXna19wMn==YCin-PLUGiXw@mail.gmail.com>
<[email protected]>
<CAJk5AtZQ-4Wg0vnYLO5BJJntMG1oBEmvediAYQKXj0OL6MsOww@mail.gmail.com>
<[email protected]>
<CAJk5AtarTco=DXJw8qDOe_CET5hUApb-aEJr5xL2pEAFgnsdNQ@mail.gmail.com>
<[email protected]>
In case you are using XFS, this might be related to the "Speculative preallocation" feature.
We saw the same behavior on Redhat 9, with PostgreSQL 18 and XFS.
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/storage_administration_guid...
Speculative preallocation
XFS uses speculative preallocation to allocate blocks past EOF as files are written. This avoids file fragmentation due to concurrent streaming write workloads on NFS servers. By default, this preallocation increases with the size of the file and will be apparent in "du" output. If a file with speculative preallocation is not dirtied for five minutes the preallocation will be discarded. If the inode is cycled out of cache before that time, then the preallocation will be discarded when the inode is reclaimed.
If premature ENOSPC problems are seen due to speculative preallocation, a fixed preallocation amount may be specified with the -o allocsize=amount mount option.
See also "man xfs"
allocsize=size
Sets the buffered I/O end-of-file preallocation size when doing delayed allocation writeout. Valid values for this option are page size (typically 4KiB) through to
1GiB, inclusive, in power-of-2 increments.
The default behavior is for dynamic end-of-file preallocation size, which uses a set of heuristics to optimise the preallocation size based on the current allocation
patterns within the file and the access patterns to the file. Specifying a fixed allocsize value turns off the dynamic behavior.
Cheers
William
-----Ursprüngliche Nachricht-----
Von: Laurenz Albe <[email protected]>
Gesendet: Mittwoch, 17. Juni 2026 13:34
An: Raj <[email protected]>
Cc: Pgsql-admin <[email protected]>
Betreff: Re: Size of /pgdata
ACHTUNG: Diese Nachricht kommt von extern. Seien Sie kritisch beim Öffnen von Links und Anhängen.
On Wed, 2026-06-17 at 11:47 +0530, Raj wrote:
> The file count is same between them..but the file size varies.
>
> For example, assume node1 has issue and node2 is clean.
>
> 1. On both nodes file count is 76
> 2. File size varies for some of them
>
> Each files are either 1GB or 2GB and some or them are 1.2gb or 1.5gb or between 1-2gb ....by looking at files..
> In the problematic node, some of the 1gb files in node2 shows 2GB in node1...and also file size differences. making the difference.
That is highly suspicious.
What do you get if you run
SHOW segment_size;
Unless you built PostgreSQL yourself after changing the segment size, it should be 1GB. But then it would be impossible for some segment to be bigger than 1GB.
Are you using some weird file system that reports file sizes wrongly?
What does "ls -l" on one of these big files show?
Yours,
Laurenz Albe
________________________________
Disclaimer:
Diese Nachricht und ihr eventuell angehängte Dateien sind nur für den Adressaten bestimmt. Sie kann vertrauliche oder gesetzlich geschützte Daten oder Informationen beinhalten. Falls Sie diese Nachricht irrtümlich erreicht hat, bitten wir Sie höflich, diese unter Ausschluss jeglicher Reproduktion zu löschen und die absendende Person zu benachrichtigen. Danke für Ihre Hilfe.
This message and any attached files are for the sole use of the recipient named above. It may contain confidential or legally protected data or information. If you have received this message in error, please delete it without making any copies whatsoever and notify the sender. Thank you for your assistance.
Attachments:
[application/pkcs7-signature] smime.p7s (5.8K, ../GV0P278MB0244DE5A2049D0A42E471445E8E42@GV0P278MB0244.CHEP278.PROD.OUTLOOK.COM/2-smime.p7s)
download
view thread (20+ messages) latest in thread
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]
Subject: Re: AW: Size of /pgdata
In-Reply-To: <GV0P278MB0244DE5A2049D0A42E471445E8E42@GV0P278MB0244.CHEP278.PROD.OUTLOOK.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