TITLE: An elementary question about adjunctions between presheaf categories preserving pullbacks. 
QUESTION [12 upvotes]: A functor $C \to D$ between categories induces a morphism of presheaf categories $Pre(D) \to Pre(C)$. This functor has a left adjoint given by left Kan extension and I am interested in knowing when this left adjoint preserves pull-back squares. 
I'm interested in any conditions that make this happen, but I am particularly interested in a special case. Let me say a little more about the context I am working in, and why I am interested. In the situation that this came up $C$ is a "lluf" subcategory of $D$, that is $C$ has the same objects as $D$ and the functor $C \to D$ is faithful. In that case it is good to call the functor $U:Pre(D) \to Pre(C)$ the forgetful functor. It automatically preserves limits and colimits. Let L be its left-adjoint.
Since C has the same objects as D, this forgetful functor is also conservative, meaning that it reflects isomorphisms. So by general non-sense (specifically Beck's monadicity theorem) this is a monadic adjunction. This means that $Pre(D) = T-alg$ is the category of T-algebras in $Pre(C)$ where T is the monad $T= UL$. 
I'm trying to understand conditions under which this monad is cartesian in the sense described at the n-lab. This means, among other things, that the monad T is supposed to send fiber products to fiber products. This is equivalent to having L send fiber products to fiber products. I want to understand when this happens. Does it always happen? Are there reasonable conditions on C or D that ensure that this happens?
Notice that I am not asking for L to be "left-exact", i.e. to commute with all finite limits. This property is generally much too strong. In particular L will not usually preserve terminal objects. This means it doesn't preserve products, but should instead send products to fiber products over $L(1)$. 
Here is an example. Let $C = pt$ be the singleton category and $D = G$ be the one object category with morphisms a group G. There is a unique inclusion $C \to D$ which is obviously faithful. The forgetful functor 
 $$U:Pre(D) \to Pre(C)$$ 
sends a G-set to its underlying set. The left adjoint L sends a set S to the free G-set $S \times G$. This doesn't preserve terminal objects, but it does commute with fiber products. What is more, the monad $T=UL$ is a classic example of a cartesian monad in the n-lab sense.  
I've played around with this, but can't seem to get it to work. I feel like this is going to be a well known result or there is going to be a counter example which sheds light on the situation. 

Question: In the context I described above (where $C \to D$ is lluf), does the left adjoint $$L: Pre(C) \to Pre(D)$$ always commute with fiber products? If not what is a counter example, and are there conditions one can place on C and D to ensure that L does commute with fiber products?

REPLY [5 votes]: Here's another way of getting to the same answer as Peter's.  A functor $F\colon A\to B$ preserves pullbacks if and only if the induced functor $F/1 \colon A \to B/F1$ preserves all finite limits, where 1 is the terminal object of A.  When F is left Kan extension $L\colon Psh(C) \to Psh(D)$ along a functor $f\colon C\to D$, it's not hard to check that Psh(D)/L1 is equivalent to presheaves on the opposite of the category el(L1) of elements of L1 (this is true with any presheaf replacing L1), and that L/1 is left Kan extension along the induced functor $f'\colon C\to el(L1)^{op}$.  Thus, we need to know when that functor is flat.
Now an object of $el(L1)^{op}$ is an object $d\in D$ together with a connected component, call it X, of the comma category $(d\downarrow f)$.  And a morphism in $el(L1)^{op}$ is a morphism $d_1\to d_2$ such that the induced functor $(d_2\downarrow f) \to (d_1\downarrow f)$ maps $X_2$ to $X_1$.  You can then check that the comma category $((d,X)\downarrow f')$ is precisely the connected component X of the comma category $(d\downarrow f)$.  Therefore, since $f'$ is flat just when all categories $((d,X)\downarrow f')$ are cofiltered, we conclude that left Kan extension along f preserves pullbacks iff all connected components of all comma categories $(d\downarrow f)$ are cofiltered, i.e. if all $(d\downarrow f)$ are "semi-filtered" in Peter's terminology.
Edit: you also asked for a specific counterexample when $f\colon C\to D$ is the inclusion of a lluf subcategory.  Let D be the walking commutative square generated by arrows $a\to b$, $a\to c$, $b\to d$, and $c\to d$, and let C be its lluf subcategory containing the identities and the arrows $b\to d$ and $c\to d$.  Then the comma category $(a\downarrow f)$ has two connected components, one of which is not semi-cofiltered.