mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-10 04:19:14 +02:00
f42d927d2d
On certain file systems (e.g. ext4) pg_control may appear torn if there is a concurrent write while reading the file. To prevent an invalid read, retry until the checksum matches the control data. Special handling is required for the pg-version-force feature since the offset of the checksum is not known. In this case, scan from the default position to the end of the data looking for a checksum match. This is a bit imprecise, but better than nothing, and the chance of a random collision in the control data seems very remote considering the ratio of data size (< 512 bytes) to checksum size (4 bytes). This was discovered and a possible solution proposed for PostgreSQL in [1]. The proposed solution may work for backup, but pgBackRest needs to be able to read pg_control reliably outside of backup. So no matter what fix is adopted for PostgreSQL, pgBackRest need retries. Further adjustment may be required as the PostgreSQL fix evolves. [1] https://www.postgresql.org/message-id/20221123014224.xisi44byq3cf5psi%40awork3.anarazel.de |
||
---|---|---|
.. | ||
auto | ||
dtd | ||
release | ||
coding.xml | ||
contributing.xml | ||
documentation.xml | ||
faq.xml | ||
index.xml | ||
metric.xml | ||
release.xml | ||
user-guide-index.xml | ||
user-guide.xml |