Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUAme-0008Gs-5F for pgsql-general@arkaria.postgresql.org; Wed, 27 Dec 2017 12:26:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUAmd-0008E2-1W for pgsql-general@arkaria.postgresql.org; Wed, 27 Dec 2017 12:26:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eUAmc-0008Dt-QM for pgsql-general@lists.postgresql.org; Wed, 27 Dec 2017 12:26:06 +0000 Received: from server5.simfrete.com ([177.52.183.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eUAmR-0002Rd-QL for pgsql-general@lists.postgresql.org; Wed, 27 Dec 2017 12:26:04 +0000 Received: from [192.168.10.30] (unknown [177.52.183.17]) by server5.simfrete.com (Postfix) with ESMTPSA id BEA2E240390 for ; Wed, 27 Dec 2017 10:28:55 -0200 (-02) Subject: Re: Does PostgreSQL check database integrity at startup? To: pgsql-general@lists.postgresql.org References: <20171226171327.437beyi2dnndslwl@alvherre.pgsql> <7a6d1d6d-3627-c68c-1ce1-b681a7062930@simkorp.com.br> From: Edson Carlos Ericksson Richter Message-ID: <4c06d5bd-4286-621a-a54e-9ea761c192c1@simkorp.com.br> Date: Wed, 27 Dec 2017 10:25:47 -0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: pt-BR List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Em 26/12/2017 20:42, Martin Marques escreveu: > El 26/12/17 a las 14:46, Edson Carlos Ericksson Richter escribió: >> Usually, or by "pg_basebackup" or by "rsync" as described in PostgreSQL >> Wiki. >> Right now, I'm doing via pg_basebackup. >> Nothing extraordinary. >> >> When using rsync: >> >> rsync -e "ssh -2 -C -p slave_ssh_port" --progress --partial -az >> /pgsql/9.6/master_data_folder/* >> superuser_name@$slave_host:/home/pgsql/9.6/slave_data_folder/ --exclude >> postmaster.pid --exclude postgresql.conf --exclude pg_log > You don't say so anywhere, but I suspect you run the rsync between a > pg_start_backup() and pg_stop_backup(), right? > > That is the way it's described in the wiki. > > Regards, > Yes, sure. When using wiki, I'm following all instructions. Process revisited many times do check if something changed (since 9.0 days :-) ) Right now, I do prefer to use pg_basebackup instead - but sometimes (when database is just too large), rsync seems more reliable (maybe it is the cause of the problem). Anyway, instead digging into rsync functionality (or bugs - I doubt, but who knows?), I do prefer to have a script I can run to check if there is obvious failures in standby servers. Looking for empty files would be a start point. I'm learning from experienced people from the list that are other points I would like to check as well. Regards, Edson.