We present a detailed investigation of the Rastall gravity extension of the standard $$\Lambda $$
Λ
CDM model. We review the model for two simultaneous modifications of different nature in the Friedmann equation due to the Rastall gravity: the new contributions of the material (actual) sources (considered as effective source) and the altered evolution of the material sources. We discuss the role/behavior of these modifications with regard to some low redshift tensions, including the so-called $$H_0$$
H
0
tension, prevailing within the standard $$\Lambda $$
Λ
CDM. We constrain the model at the level of linear perturbations, and obtain the first constraints through a robust and accurate analysis using the latest full Planck cosmic microwave background (CMB) data, with and without including baryon acoustic oscillations (BAO) data. We find that the Rastall parameter $$\epsilon $$
ϵ
(null for general relativity) is consistent with zero at 68% CL (with a tendency towards positive values, $$-0.0001< \epsilon < 0.0007$$
-
0.0001
<
ϵ
<
0.0007
(CMB+BAO) at 68% CL), which in turn implies no significant statistical evidence for deviation from general relativity, and also a precision of $$\mathcal {O}(10^{-4})$$
O
(
10
-
4
)
for the coefficient $$-1/2$$
-
1
/
2
of the term $$g_{\mu \nu }R$$
g
μ
ν
R
in the Einstein field equations of general relativity (guaranteeing the local energy-momentum conservation). We explore the consequences led by the Rastall gravity on the cosmological parameters in the light of the observational analyses. It turns out that the effective source, with a present-day density parameter $$\Omega _\mathrm{X0}=-0.0010\pm 0.0013$$
Ω
X
0
=
-
0.0010
±
0.0013
(CMB+BAO, 68% CL), dynamically screens the usual vacuum energy at high redshifts, but this mechanism barely works due to the opposition by the altered evolution of cold dark matter. Consequently, two simultaneous modifications of different nature in the Friedmann equation by the Rastall gravity act against each other, and do not help to considerably relax the low redshift tensions, including the so-called $$H_0$$
H
0
tension. Our results may offer a guide for the research community that studies the Rastall gravity in various aspects of gravitation and cosmology.