Getting PQ error while taking DB backup


After upgrading my GitLab to 16.0.0 version, I am getting the below error while taking DB backup via command gitlab-rake gitlab:backup:create

Caused by:
ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

Any help will be much appreciated !