Re: [Patch] Optimize dropping of relation buffers using dlist
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: "k.jamison@fujitsu.com" <k.jamison@fujitsu.com>,
"tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
"amit.kapila16@gmail.com" <amit.kapila16@gmail.com>,
"andres@anarazel.de" <andres@anarazel.de>,
"robertmhaas@gmail.com" <robertmhaas@gmail.com>,
"tomas.vondra@2ndquadrant.com" <tomas.vondra@2ndquadrant.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-10-22T04:52:00Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes: > Hmmm. The Linux comment led me to commit ffae5cc and a 2006 thread[1] > showing a buggy sequence of system calls. Hah, blast from the past ... > AFAICS it was not even an > SMP/race problem of the type you might half expect, it was a single > process not seeing its own write. I didn't find details on the > version, filesystem etc. Per the referenced bug-reporting thread, it was ReiserFS and/or NFS on SLES 9.3; so, dubious storage choices on an ancient-even-then Linux kernel. I think the takeaway point is not so much that that particular bug might recur as that storage infrastructure does sometimes have bugs. If you're wanting to introduce new assumptions about what the filesystem will do, it's prudent to think about how badly will we break if the assumptions fail. regards, tom lane
Commits
-
Fix size overflow in calculation introduced by commits d6ad34f3 and bea449c6.
- 519e4c9ee21a 14.0 landed
-
Optimize DropRelFileNodesAllBuffers() for recovery.
- bea449c635c0 14.0 landed
-
Optimize DropRelFileNodeBuffers() for recovery.
- d6ad34f3410f 14.0 landed
-
Cache smgrnblocks() results in recovery.
- c5315f4f4484 14.0 cited
-
Add a check to prevent overwriting valid data if smgrnblocks() gives a
- ffae5cc5a602 8.2.0 cited