"Tom Lane" <[EMAIL PROTECTED]> wrote > > Yes, the patch is wrong as-is because it may lose uncompleted fsyncs. > But I think that we could just add the AbsorbFsyncRequests call in the > fsync loop and not worry about trying to avoid doing extra fsyncs. > > Another possibility is to make the copied list as in the patch, but > HASH_REMOVE an entry only after doing the fsync successfully --- as long > as you don't AbsorbFsyncRequests between doing the fsync and removing > the entry, you aren't risking missing a necessary fsync. I'm > unconvinced that this is worth the trouble, however. >
Maybe the take a copied list is safer. I got a little afraid of doing seqscan hash while doing HASH_ENTER at the same time. Do we have this kind of hash usage somewhere? Regards, Qingqing ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq