Greetings,
* PG Bug reporting form (noreply(at)postgresql(dot)org) wrote:
> * Enable exclusive backup
> psql -c "select pg_start_backup('')"
>
> * Find pid of main postgres process
> ps -ef | grep 'postgres -D'
>
> * Send SIGKILL to found pid
> kill -s KILL <pid>
Don't kill the postmaster and don't use exclusive backup (which has been
deprecated, due specifically in part to the issue that it causes
problems on a crash).
> This is particularly a problem when running postgres in Docker, as Docker
> will send SIGKILL if database shutdown takes more than a few seconds.
You'll want to fix that then.
Thanks,
Stephen