Stop postgresql postmaster on docker container

I present the Postgresql server in a Docker container and have performed the necessary mounting operations. I got an error on Postgresql side:

ERROR:  database is not accepting commands to avoid wraparound data loss in database "postgres"

HINT:  Stop the postmaster and vacuum that database in single-user mode.You might also need to commit or roll back old prepared transactions, or drop stale replication slots.
CONTEXT:  automatic vacuum of table "tablename"

The error is related to postgresql, but I need to stop postmaster in the docker container and log in as a single user. I have no idea how this process works in a Docker container.

Sicne we know nothing about how your container works, how it runs multiple services, all we can tell you how you can “log in” as a specific user.

docker exec -it -u USERID CONTAINER_NAME sh

you can use a username instead of a userid.