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 1uCzOl-004zRD-Jm for pgsql-general@arkaria.postgresql.org; Thu, 08 May 2025 11:26:43 +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 1uCzOk-002kF6-Km for pgsql-general@arkaria.postgresql.org; Thu, 08 May 2025 11:26:42 +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 1uCzOk-002kEu-7c for pgsql-general@lists.postgresql.org; Thu, 08 May 2025 11:26:42 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uCzOh-000kuc-2Z for pgsql-general@lists.postgresql.org; Thu, 08 May 2025 11:26:41 +0000 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-72c173211feso242937a34.1 for ; Thu, 08 May 2025 04:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746703600; x=1747308400; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mz2Zaa049j/ABbBaEQNfqR4CHSVx2KgJBusDtwis61w=; b=T73SSnhgsPea7LuoCijTkLHZ9rNjxzdNhlOIb72dOMNknw+AFdd546yYYIXHR+cQm3 tKnfh6TkCzBRMRWUJzy8dEXVbsKZ/VdewwSIAyPdqqf6YPk9bVbCwfmkmGVWXY7LdPyL 7LyhDw9ozy9OlW76Fm8Fg3+ZSJTQJApes9xm6MtEzdPcoIRLtJRgfxsvdCcwBLdfyZ2S V6y6lz5UeFg8QL7lc172p0EUlidc8+LFzfWKz7tJlfj5cUYYlsud0iiR1p359WM39VlY vAUEwMM5gd3w9daFu1LYBYip+eexqckpi9CVhH+eaUyM11Nu2K49LcCaE7OsTAgyUJVp 8xeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746703600; x=1747308400; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mz2Zaa049j/ABbBaEQNfqR4CHSVx2KgJBusDtwis61w=; b=NQkwILoMe4ARWw0TOgTlBWM1ai5ldNZuJupU81Bl38nrFJI0BgCNsnipe7JBdtrY8/ vp8DG+qt/Io5j8fJPDLaIVWJhsyZR3OGUEw4KKe+llkGLXX6A+HZw3a9TTl/2siL1gD8 c9nxZA35RrymV0ZMOBNkndRu/IRbXRgyGR85T+qEKssmqAQCwFW79XkCvZubGIONxrrx P+CUyUXLzyGUHBreD8AurA8xnRi/YbbySeR94rDp5eRM/9e5wmEBAGtCiNncmfbIbyir nsZPx56hele6KnqkMLSoKsy1JS0CMqoMrkdrBj8kF/U9YvJP+NlD0ZJhceGWzeEIfPP6 PT2w== X-Gm-Message-State: AOJu0YxDzS374Sdlz1kuO5y8YKgjfHS43dupqjdaZA77aJ2iXjRh7KFE O30n1KDxlonLFuQRSf8eDCSeLW+5frWEqJNpdhoRzjzPfzOsEZ/gNllnWXTWmVfWDf1oAO63F0R 9RSvNOAgZMhv40vO8C8Wa+pkAmOXlIloPaOQ= X-Gm-Gg: ASbGncv4bn0k21mUGbX7V438aCz8E+mVoPse/xyvUUAZ63vKWcSp+/02EEwJ35zregY aJ1xwEZ6iP6dkrVdcjECLJ+infGgCfB4sb3M4w640Lus55UggatrxUEo3YdpYrjEq1+G0wUUbD7 LqwoLC7L/s7fjJMdUdBsym X-Google-Smtp-Source: AGHT+IFI2eNzpx8xTe3GIpp5hoyp7EpFxz2Lg8I24+Ch0ioJBJkkX6aepuS5eh+pIQrgtX3jMm0K8+0bkFA0aW3uwZc= X-Received: by 2002:a05:6830:6996:b0:72b:943f:dda8 with SMTP id 46e09a7af769-73210b267c2mr5010538a34.26.1746703599653; Thu, 08 May 2025 04:26:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luca Ferrari Date: Thu, 8 May 2025 13:26:03 +0200 X-Gm-Features: ATxdqUFY_DitV2GJQ0rLjfppxiLkdL2DhUGyD8L8co3QRW6DWE0EKrxFGIp26jM Message-ID: Subject: Re: pg_rewind problem: cannot find WAL To: Laurenz Albe Cc: pgsql-general Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 8, 2025 at 8:54=E2=80=AFAM Luca Ferrari w= rote: > > I've pgbackrest making backups, so I have an archive_command. I'm > going to see if putting a restore_command can fix the problem. > But I'm facing a quite trivial problem: in ubuntu installation the configuration files are separated from the PGDATA. Apparently pg_rewind is trying to read postgresql.conf to get the restore_command, and I don't know how to specify the different location of the postgresql.conf (cannot specifcy -c as in postgres): $ /usr/lib/postgresql/17/bin/pg_rewind -D /var/lib/postgresql/17/main --source-server=3D"user=3Dreplica_fluca host=3Ddev-psqlha3 dbname=3Dreplica_fluca" -R -P --debug -c postgres: could not access the server configuration file "/var/lib/postgresql/17/main/postgresql.conf": No such file or directory no data was returned by command "/usr/lib/postgresql/17/bin/postgres -D /var/lib/postgresql/17/main -C restore_command" child process exited with exit code 2 pg_rewind: error: could not read restore_command from target cluster Any idea? Clearly, postgresql.auto.conf is within PGDATA, and since my recovery_command is there, one trick could be to touch and empty PGDATA/postgresql.conf, pg_rewind, remove the fake configurtion file. But I'm sure there is a smarter solution. Thanks, Luca