I have trouble wrapping my head around the thermodynamic identity.
From Schroeder's book "An Introduction to Thermal Physics," I understand that entropy is defined as $$\mathrm dS=\frac{δQ}T\tag1$$ Later in the book, however, the author warns that $Q=T\,\mathrm dS$ only holds when the change in volume of the process takes place quasi-statically because we then know that $W=-p\,\mathrm dV$. So, from the thermodynamic entity $$\mathrm dU=T\,\mathrm dS−p\,\mathrm dV\tag2$$ we can associate the heat and work with the first and second terms, respectively.
These two affirmations seem contradictory to me, and I can't seem to figure it out.
My Questions:
Under which assumptions is equation $(1)$ true?
When this equation isn't true, how can we find the change in entropy of a system?