set_post_thumbnail_size has no effect – always 200×300 size is generated

add_image_size works fine for me.

Try this:

add_image_size( 'custom-size', 145, 170 )

If you need to cut image:

add_image_size( 'custom-size', 145, 170, true );

To understand it better read the documentation