  Constraint Satisfaction Problem (CSP) is a fundamental algorithmic problem
that appears in many areas of Computer Science. It can be equivalently stated
as computing a homomorphism $\mbox{$\bR \rightarrow \bGamma$}$ between two
relational structures, e.g.\ between two directed graphs. Analyzing its
complexity has been a prominent research direction, especially for {\em fixed
template CSPs} in which the right side $\bGamma$ is fixed and the left side
$\bR$ is unconstrained.
  Far fewer results are known for the {\em hybrid} setting that restricts both
sides simultaneously. It assumes that $\bR$ belongs to a certain class of
relational structures (called a {\em structural restriction} in this paper). We
study which structural restrictions are {\em effective}, i.e.\ there exists a
fixed template $\bGamma$ (from a certain class of languages) for which the
problem is tractable when $\bR$ is restricted, and NP-hard otherwise. We
provide a characterization for structural restrictions that are {\em closed
under inverse homomorphisms}. The criterion is based on the {\em chromatic
number} of a relational structure defined in this paper; it generalizes the
standard chromatic number of a graph.
  As our main tool, we use the algebraic machinery developed for fixed template
CSPs. To apply it to our case, we introduce a new construction called a "lifted
language." We also give a characterization for structural restrictions
corresponding to minor-closed families of graphs, extend results to certain
Valued CSPs (namely conservative valued languages), and state implications for
CSPs with ordered variables, (valued) CSPs on structures with large girth, and
for the maximum weight independent set problem on some restricted families of
graphs including graphs with large girth.
