In order for $K_X$ to exist you need some restriction on the singularities of $X$. See [this][1] MO answer for some thoughts on that. The most usual assumption to make is that $X$ is normal which implies that it is non-singular in codimension $1$. In order to pull-back $K_X$ and still get a divisor, you need something more, the usual assumption is that it should be $\mathbb Q$-Cartier. See [this][2] MO answer for more on that. If you have that $X$ and $Y$ are non-singular in codimension $1$, then you can forget about the second condition and just consider the formula on the non-singular part. (Strictly speaking you would want to restrict to the image of the non-singular part of $X$ on $Y$ so you'd still have a finite map). So, let's say that both $X$ and $Y$ are smooth and $\pi$ is finite. Then localizing at height $1$ primes (or codimension $1$ points) reduces the statement to curves. Albeit not over the original field, but it's still OK. I think this should cover two of your questions. [1]: http://mathoverflow.net/questions/35736/the-canonical-line-bundle-of-a-normal-variety/46663#46663 [2]: http://mathoverflow.net/questions/55526/example-of-a-variety-with-k-x-mathbb-q-cartier-but-not-cartier/55529#55529