You need to modify the posts per page argument of the WP_Query object like so:
$post_ids = new WP_Query(array(
'post_type' => 'sample',
'fields' => 'ids',
'posts_per_page' => -1
));
By setting posts_per_page
to -1
your loop will return all posts. If this argument is not supplied the number of posts will default to the posts per page setting in Reading -> Settings.