Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trdIY-006W99-6Y for pgsql-admin@arkaria.postgresql.org; Mon, 10 Mar 2025 13:36:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1trdIW-00BvSp-6v for pgsql-admin@arkaria.postgresql.org; Mon, 10 Mar 2025 13:36:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1trdIV-00BvSg-RX for pgsql-admin@lists.postgresql.org; Mon, 10 Mar 2025 13:35:59 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1trdIS-0022si-00 for pgsql-admin@lists.postgresql.org; Mon, 10 Mar 2025 13:35:59 +0000 Message-ID: <14582e1f-4a34-46b8-a20a-ad653930ecb4@cloud.gatewaynet.com> Date: Mon, 10 Mar 2025 15:35:54 +0200 MIME-Version: 1.0 Subject: Re: log repl exercise monitor setup To: pgsql-admin@lists.postgresql.org References: <7c760edb024dc59e92c7c624ae5e00052c8becde.camel@ucll.be> Content-Language: en-US From: Achilleas Mantzios - cloud In-Reply-To: <7c760edb024dc59e92c7c624ae5e00052c8becde.camel@ucll.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/10/25 14:49, Wim Bertels wrote: > Hello, > > i would like to setup a mass test environment for 250+ students > > for example a setup with two clusters that we manage: cluster PUB and > cluster SUB > > goal: on cluster PUB each student has its own database > mirrored/replicated to his own database at cluster SUB > > starting point: > * the databases on cluster PUB already exist with content > * the empty databases on cluster SUB already exist (without any > content) > * no publication (and thus subscription is already running) > > so the exercise for each student would be: > 1. create publication > 2. mirror the structure (backup/restore) > 3. create subscription > 4. test replication (with dml: insert/..) Sounds like fun project! My daughter studying in https://www.ece.tuc.gr/en/home also had access to a automated personal PostgreSQL DB while she was attending the DB course. They only learned SQL tho, no admin stuff, it is cool that you guys are teaching this. > So what would be your suggestion to setup an easy monitoring setup to > check that the student succeeded in this exercise I'd create custom scripts with count(*) from all tables, sorted by table name and verifying those two match and that the #lines match the expected number of tables. > > background: vanilla debian with postgres apt repository, preferable > with software from these repositories for security and maintenance > reasons > > (at the moment i check with some handmade scripts that query the > cluster and the logs) > > mvg, > Wim