Re: [PATCHES] Fix mdsync never-ending loop problem
От | Tom Lane |
---|---|
Тема | Re: [PATCHES] Fix mdsync never-ending loop problem |
Дата | |
Msg-id | 27771.1176226580@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [PATCHES] Fix mdsync never-ending loop problem (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>) |
Список | pgsql-hackers |
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes: > Here is another patch to fix never-ending loop in mdsync. I introduced > a mdsync counter (cycle id) and cancel flags to fix the problem. > The mdsync counter is incremented at the every beginning of mdsync(). > Each pending entry has a field assigned from the counter when it is > newly inserted to pendingOpsTable. Only entries that have smaller counter > values than the mdsync counter are fsync-ed in mdsync(). > Another change is to add a cancel flag in each pending entry. When a > relation is dropped and bgwriter receives a forget-request, the corresponding > entry is marked as dropped but we don't delete it at that time. Actual > deletion is performed in the next fsync loop. We don't have to retry after > AbsorbFsyncRequests() because entries are not removed outside of seqscan. This patch looks fairly sane to me; I have a few small gripes about coding style but that can be fixed while applying. Heikki, you were concerned about the cycle-ID idea; do you have any objection to this patch? > This patch can be applied to HEAD, 8.2 and 8.1 with a few hunks. I don't think we should back-patch something that's a performance fix for an extreme case, especially not when it's not been through any extensive testing yet ... regards, tom lane
В списке pgsql-hackers по дате отправления: