Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL – waiting for checkpoint to complete

Tags:

postgresql

When trying to perform pg_basebackup on a replica, I always get the following message:

postgres@db1:~/10$ pg_basebackup -h foo.bar.com -U repluser -D /var/lib/postgresql/10/main -v -P 
pg_basebackup: initiating base backup, waiting for checkpoint to complete

I've tried waiting, but nothing happens. Is it possible to speed up the process?

like image 499
Max Malysh Avatar asked Dec 15 '17 00:12

Max Malysh


1 Answers

It's possible to force a checkpoint to complete. To do so, run CHECKPOINT; on the master server:

$ sudo su - postgres
$ psql
postgres=# CHECKPOINT;
like image 196
Max Malysh Avatar answered Sep 18 '22 15:09

Max Malysh