You need to export your DB and impirt it again. You can not simply upgrade. Switch back to v15 and make a dump.
Here is a little guide.
Pict-rs can be upgraded simply. Edit your docker-compose.yml and spin it up. After tge upgrade is complete, you can do the postgres upgrade
If you only want to start 1 service of your entire compose file just use the name in the service section. No need to comment out everything else. For Lemmy it would be:
docker compose up -d postgres
This will only start the postgres container of this stack. Glad you found a way which worked for you ☺️