Terminating connection because of crash of another server process

Hi All,
While restoring the bakcup then we are getting the below error.

Command: psql -U postgres -d postgres < /db/backup/postgres.sql
Any idea about the below error? can someone please help me with the below error?

WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost


WARNING: terminating connection because of crash of another server process

Okay, standard operating procedure, here are the questions:

  • version postgres
  • linux distribution
  • extensions installed

Bonus: the amount of RAM and SWAP at the time of the incident.

Hope this helps.

Hi @Robert_Bernier

Sorry for the late reply.

  • version postgres - PostgreSQL 11
  • linux distribution - Rocky Linux
  • extensions installed -


Actually, we are trying to migrate data from Centos to Rocky Linux.

Quick observation: You are probably running out of RAM. To confirm this theory I suggest you perform the backup and monitor RAM in real time to see where it goes.

Assuming it’s a resource issue:

  • track the number of connections at the time of the backup
  • calculate the amount of RAM consumed by work_mem and maintenance_work_mem at the time of the crash.

Hope this helps.

But actually this error we are getting while restoring the data.

Note: with the same RAM configuration Centos is working fine. but not sure why its failing to restore in the Rocky linux server.

Is there any settings different between Centos and Rocky linux?

@Robert_Bernier Can you please help me with the above issue? with the same RAM configuration its working fine in the Centos version but not in the Rocky Linux server.

@Naresh9999 ,

If the RAM is the same, then the next step is to look at the data cluster and the file system itself as you might have a corrupted data cluster.

If you have the cluster in its own partition then consider reformatting the entire partition and reinstalling the data cluster. Otherwise, I’d suggest at a rebuild of the cluster.

There’s a number of other options but it depends on your time and the purpose of the cluster. For example if it was a cluster just for personal development and not impacting production you could attempt a VACUUM FULL of the entire data cluster. Alternatively, pg_repack the cluster instead.

Sure @Robert_Bernier

Thanks for the suggestions, I will try this and update you.
But even we have rebuilt entire cluster multiple times but no luck.

Sometimes when I have puzzles like this I start considering “extreme” solutions such as for example rebuilding the cluster on both another CENTOS and ROCKY OS and see if you can reproduce the errors.

On the off chance you can reproduce the errors then get back to me here and I’ll walk you through the process of submitting a bug report with the postgres community.

sure @Robert_Bernier

If we can reproduce then I will share you the steps.

Thanks for the help.