Re: checkpointer continuous flushing - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: checkpointer continuous flushing
Date
Msg-id alpine.DEB.2.10.1509070912460.32076@sto
Whole thread Raw
In response to Re: checkpointer continuous flushing  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Hello Amit,

>> It'd not really simplify things, but it'd keep it local.
>
> How about using the value of guc (checkpoint_flush_to_disk) and 
> AmCheckpointerProcess to identify whether to do async flush in 
> FileWrite?

ISTM that what you suggest would just replace the added function arguments 
with global variables to communicate and keep the necessary data for 
managing the asynchronous flushing, which is called per tablespace
(1) on file changes (2) when the checkpointer is going to sleep.

Although it can be done obviously, I prefer to have functions arguments 
rather than global variables, on principle.

Also, because of (2) and of the dependency on the number of tablespaces 
being flushed, the flushing stuff cannot be fully hidden from the 
checkpointer anyway.

Also I think that probably the bgwriter should do something similar, so 
function parameters would be useful to drive flushing from it, rather than 
adding yet another set of global variables, or share the same variables 
for somehow different purposes.

So having these added parameters look reasonable to me.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Horizontal scalability/sharding
Next
From: Etsuro Fujita
Date:
Subject: Re: Foreign join pushdown vs EvalPlanQual