We classify all compactly generated t-structures in the unbounded derived category of an arbitrary commutative ring, generalizing the result of [ATLJS10] for noetherian rings. More specifically, we establish a bijective correspondence between the compactly generated t-structures and infinite filtrations of the Zariski spectrum by Thomason subsets. Moreover, we show that in the case of a commutative noetherian ring, any bounded below homotopically smashing t-structure is compactly generated. As a consequence, all cosilting complexes are classified up to equivalence.