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 1tOZu8-007IlL-Na for pgsql-general@arkaria.postgresql.org; Fri, 20 Dec 2024 10:06:45 +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 1tOZu8-008g0p-2D for pgsql-general@arkaria.postgresql.org; Fri, 20 Dec 2024 10:06:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tOZu7-008g0Z-MX for pgsql-general@lists.postgresql.org; Fri, 20 Dec 2024 10:06:43 +0000 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tOZu4-000X2z-T1 for pgsql-general@lists.postgresql.org; Fri, 20 Dec 2024 10:06:42 +0000 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-467918c35easo24206551cf.2 for ; Fri, 20 Dec 2024 02:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734689200; x=1735294000; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=3hNUXvGzzzSk+iuU2BNN5dyfvsMGME/x1YxP6BKsvj4=; b=FlOJd+X+RHza9M8c/o+JbQhKdZ4PsOK0KlwbnOaAySU6K9PXx7Uk/tb2QFKw9Knaim OtdARGqt1ML1Vq5W/pNErgqqgQrlDbkWPwzPzdmvV9+LlpXK0UIA/HcFT/I5pmNXRgZJ vmtNIp6sZHFe92HuBmd+9AgeZ2HhWmuX3TS9KNKeK13+6+bArY4n0z6zuc6GuZU/LwHn +R9TF3Ag27C1+SLI/Sadr4X4UMvy07bTMjGJkm72jX3pR6oucUTq5rHevzyL/fPJlaR7 5iteylfx7/mO4V1p6/9w1f4WT+mIyw0m5KKDdZbgl9darj37F83u5SlbwOw2zFOsJu70 A+hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734689200; x=1735294000; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3hNUXvGzzzSk+iuU2BNN5dyfvsMGME/x1YxP6BKsvj4=; b=XWGFCslQI+e4HTxB41uGI+zyeinaHkoKEaTCPgsUbuP37Nev53WvKwQNTb/r3gmCge Aha5xQeX/NGVvF5eybAPqJWXCk8BMaLsWogreIeVSi4QRpUKsB6cvVLyBvvpSnSZmwW+ RtRvqCcEe4c0iaJj/A6f4SMiFdbc8au/UpRQwX147Ogr09oj+p/6TfKxJrTHJdrsypI0 vtuWlfKsSnHHxncbOG0uNbCv5DxNtZ1Wc/tAKL6rn20qz+0EVLbWyS2/x1ZN8zjTcdae rAdqxW1Va8W4YIJhnDO96vyJnfshRHCD6FGDlGkgZKhHzhAE0taUiSqP9FVdT9akFoAV i0PQ== X-Gm-Message-State: AOJu0YyTx7xH3LHj1bNfzobNLI7UCY8U9jfy2uAdv0DAA+Yiz5GZf1bj MBxTl3fLU9FVbssq4NQOLSQrLEpqQTsgI5TwRhHBe2WeV8rNs8djXGHeB+6a27cMoFuBVHjP6MU BW7uHpbXrNQMTeg06g4hZaEt5Uq7OzY/N X-Gm-Gg: ASbGncsG9t+wPHQ+AcOS9bU3FNSLDr8I/Xz+SNmbFMAYa9WcexpCfm/Fa9C1QD51TPJ 6JwBom/EBQWUStHnW3fkGtzY/xEvmK79InTJoiIGtfLOKPCwKmcXXguLybqgquzazpUsGaayR X-Google-Smtp-Source: AGHT+IF5cEWxSso8VKQUOlwPWI0vdXqJKkbx+jhKY7BxMYgoxxEQEfR0o4QQ2ZkXuJfEp/Y+LePzhbMS2CD56z+31VQ= X-Received: by 2002:ac8:5954:0:b0:467:5c9f:9fec with SMTP id d75a77b69052e-46a4a8dcccamr40304381cf.21.1734689199927; Fri, 20 Dec 2024 02:06:39 -0800 (PST) MIME-Version: 1.0 From: Ekaterina Amez Gonzalez Date: Fri, 20 Dec 2024 11:06:29 +0100 Message-ID: Subject: Streaming replication problem with collation To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000008eb4390629b0cd33" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008eb4390629b0cd33 Content-Type: text/plain; charset="UTF-8" Hi List, I'm making some tests in order to prepare a db migration. We have version 9.6 over CentOS 7 and we're going to migrate to version 15 over Rocky Linux 9. Of course there is a no downtime requirement or I wouldn't be here asking. I was previously aware of the problem with different glibc version between systems before I started my tests, but I tried it anyway. I first upgraded CentOS version to 15 and then made a streaming replication to the other server (Rocky). After that I encountered the next warning when connecting to new hot standby database: WARNING: database my_db has a collation version mismatch DETAIL: The database was created using collation version 2.17, but the operating system provides version 2.34. HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE my_db REFRESH COLLATION VERSION, or build PostgreSQL with the right library version. I tried what was suggested: reindexing and running "refresh collation" alter after that and everything seems to work ok so this looks like an easy wat to migrate from one server to another. Plus I feel more comfortable using streaming replication than logical replication, and also I find it more useful when you need to replicate the whole cluster. So my question is: is there anything I'm missing here, some kind of problem that could hit my face after moving to the new server? Thanks in advance, Ekaterina --0000000000008eb4390629b0cd33 Content-Type: text/html; charset="UTF-8"
Hi List,

I'm making some tests in order to prepare a db migration. We have version 9.6 over CentOS 7 and we're going to migrate to version 15 over Rocky Linux 9. Of course there is a no downtime requirement or I wouldn't be here asking.

I was previously aware of the problem with different glibc version between systems before I started my tests, but I tried it anyway. I first upgraded CentOS version to 15 and then made a streaming replication to the other server (Rocky). After that I encountered the next warning when connecting to new hot standby database:

WARNING: database my_db has a collation version mismatch
DETAIL: The database was created using collation version 2.17, but the operating system provides version 2.34.
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE my_db REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.

I tried what was suggested: reindexing and running "refresh collation" alter after that and everything seems to work ok so this looks like an easy wat to migrate from one server to another. Plus I feel more comfortable using streaming replication than logical replication, and also I find it more useful when you need to replicate the whole cluster.

So my question is: is there anything I'm missing here, some kind of problem that could hit my face after moving to the new server?

Thanks in advance,

Ekaterina

--0000000000008eb4390629b0cd33--