Earlier quoted context omitted.
If physical integrity is already provided by the backing filesystem, such as ZFS, wouldn't --data-checksums be redundant?
If data is served from ARC, it's primary cache, ZFS does not perform a checksum check before handing it to you, as the data was checked when it got read into the ARC. If you use ECC you're quite safe, but ECC can't detect multi-bit errors, just single and double bit errors. So if you care much about your integrity, you might want Postgres to do its checksum check as well.
How Postgres stores data on disk – this one's a page turner
51–60 of 98 posts
Re: How Postgres stores data on disk – this one's a page turner
#52This URL is blocked by my company's network because of a certain substring in the URL lol
A classic case of the Scunthorpe problem: https://en.wikipedia.org/wiki/Scunthorpe_problem In this case the substring is part of the author's name. Such names are not at all uncommon.
You may have heard of him more recently with the Hexagonal Architecture approach.
Re: How Postgres stores data on disk – this one's a page turner
#53Earlier quoted context omitted.
I was on a mailing list once where messages were blocked because of m sexchange being in the headers.
Any relation to ExpertsExchange?
Re: How Postgres stores data on disk – this one's a page turner
#54This URL is blocked by my company's network because of a certain substring in the URL lol
I once worked for a company that blocked Cuban sites because of .cu (which is the Portuguese word for the end of your digestive system), but did not block porn sites (or so I was told ;-).
“The rumors are true!”
(Although less amusing, you could also just ask the IT guys and gals)
Re: How Postgres stores data on disk – this one's a page turner
#55Re: How Postgres stores data on disk – this one's a page turner
#56> This process of retrieving the expected database state from the WAL is called logical decoding and Postgres stores files related to this process in here. While logical decoding is about WAL, it is not related to the recovery process. Logical decoding is a mechanism to convert the WAL entries back into the high-level operations that caused the WAL entries, for example for replication or audit.
Re: How Postgres stores data on disk – this one's a page turner
#57Next paragraph mentions TOAST and this byte is related to that. The low order bits (on little endian platforms) determine whether the value is stored inline (00, first 4 bytes are total length), is stored in TOAST table (11) or is shorter than 127 bytes (01 for even length, 10 for odd length, the total length is first byte >> 1). So for 0x25 you get 01, so length is 0x25 >> 1 = 18, which is that byte followed by "Equatorial Guinea".
Edit: the reason why endianness matters is that the same representation is also used in memory and the whole first word is interpreted as one length value. The toast tag bits have to be in first byte, which is most easily done as two highest order bits of that word on big endian. That means that it is placed in the two highest bits of the byte.
Re: How Postgres stores data on disk – this one's a page turner
#58> This process of retrieving the expected database state from the WAL is called logical decoding and Postgres stores files related to this process in here. While logical decoding is about WAL, it is not related to the recovery process. Logical decoding is a mechanism to convert the WAL entries back into the high-level operations that caused the WAL entries, for example for replication or audit.
Very good point, I've rephrased this.
Logical decoding (which needs wal_level=logical which extends the WAL format with additional metadata) is about parsing the WAL for other purposes than performing the recovery (or physical replication, which is essentially the same thing as recovery, but performed on another instance of the same cluster). The name "logical decoding" is certainly intended to emphasize that there are other uses for that than logical replication, but these are not that different from logical replication on this level (get a stream of changed tuples in tables).
Re: How Postgres stores data on disk – this one's a page turner
#59This URL is blocked by my company's network because of a certain substring in the URL lol
Re: How Postgres stores data on disk – this one's a page turner
#60This URL is blocked by my company's network because of a certain substring in the URL lol
A classic case of the Scunthorpe problem: https://en.wikipedia.org/wiki/Scunthorpe_problem In this case the substring is part of the author's name. Such names are not at all uncommon.