I know, nobody in their mind should do that, but, if the postmaster process is killed with SIGKILL signal, most backend processes correctly notice the fact of the postmaster process absence and exit. There is one exception though, when there are autovacuum worker processes they are continuing to run until eventually finish and exit.
…
I was able to reproduce it with 13.0 and 12.4, and I believe older versions are also affected.