Even if you stop the instance normally, the latest userlogs are not necessarily extracted. For example, userlogs contained in the current WAL segment file that cannot be archived, or in the most recent archive file generated during a graceful shutdown. These userlogs will be extracted the next time you start them, but if you want to extract them when you stop them, do the following:
Complete all transactions that print userlogs and then do not start them.
Run the pg_switch_wal() function to switch the current WAL segment file. You can find the current segment file name before switching:
select pg_walfile_name(pg_switch_wal());
Wait for the extraction file with the same name as above to be completed. The waiting time takes the value of the userlog.extract_interval parameter plus a few seconds (time required for archiving and generating the extracted file).