Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJYZp-0003Vh-66 for pgsql-general@arkaria.postgresql.org; Mon, 14 Feb 2022 10:27:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJYZn-0003VQ-RM for pgsql-general@arkaria.postgresql.org; Mon, 14 Feb 2022 10:27:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJYZn-0003VH-Ex for pgsql-general@lists.postgresql.org; Mon, 14 Feb 2022 10:27:23 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nJYZk-0003zg-OK for pgsql-general@lists.postgresql.org; Mon, 14 Feb 2022 10:27:22 +0000 Received: by mail-pf1-x429.google.com with SMTP id g1so8649966pfv.1 for ; Mon, 14 Feb 2022 02:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=z2KleK52UuWFRgG2bAvBz3qGakhfwJyaSlMTl/47DIM=; b=OOAPG/x7om8K2+Cna04uhNA6VEXw7St089Sy3/SzumT5s6ZOivOwu4tfYWz0bbT2q6 jOhybdyed/gixcvNXENfRSUhR/GltefXehWGnAD6XsJltF51NY06wkp9STFmH6Aa5bpx +8ChN2io37KsSX6RgIZ9ZQdNBHXvfjaL82zrakDzdyIXR3HSQ8PF/g/BSOJ+A9ybrNmW 8BlscamQvpL3MxEvtc/rOBdNMMCVHGXaIT99uUb55Ss2lba0au65ISgMkYMJFSq1tJ8z FfO3vCx2ZrwTP24YJNjKn0QI0z0DEhs+tSMO7DonPEpf8mflwrdlEOnx8RJ4ypjbXyEx L14A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=z2KleK52UuWFRgG2bAvBz3qGakhfwJyaSlMTl/47DIM=; b=vZeuxukVKVDAF2v/rEWMxsL0blSViTeIaaDXRL+IEFPhoN/gu3/FjYki2wbGwsQoDe 7THTgyYpT8xuMs0d+aEYGqNXaQSVPXPeGnFkcFmeaw8kWsbVMQHzT6MoTVs8l2YHfom1 36ye5Hi/T+vGxMxjfxfsacenCtaW11KXp7lnGngr0VMMRHHGjaxbmCwm7feZXHJoG5sA h3K2jtJPOcLoPcPWLG+3ZhhvvdElEH6PUdvRYS2J/fPfCztlgvb4KvMzT9sOtCALAHgj AKrLIHFCTa6d0wYQHrONADsvfXdrxdGCdcJpdyKLsyykxTPf1U0z0JKUXGk1rUb7UjtE 7xnw== X-Gm-Message-State: AOAM531fFxwLZQ1kVy9iGyHWiuOmzpVVPmQj6gR50OMQJoFJljkG5/Y8 T23eYeDjt4UZZaSesYScsxs= X-Google-Smtp-Source: ABdhPJwhlCmxknskocjUjM0TjkVS00inZ3isVEhA+9mG7YpScLl4W0GSCrfCgEJlp4bYj3sAzphl0g== X-Received: by 2002:aa7:8394:: with SMTP id u20mr13504118pfm.85.1644834439473; Mon, 14 Feb 2022 02:27:19 -0800 (PST) Received: from jrouhaud (2001-b011-1005-5f8d-d1b5-2d12-8814-ef03.dynamic-ip6.hinet.net. [2001:b011:1005:5f8d:d1b5:2d12:8814:ef03]) by smtp.gmail.com with ESMTPSA id q2sm1902845pfu.160.2022.02.14.02.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 02:27:19 -0800 (PST) Date: Mon, 14 Feb 2022 18:27:15 +0800 From: Julien Rouhaud To: Marian Pompura Cc: pgsql-general@lists.postgresql.org Subject: Re: PostgreSQL extensions during switchover Message-ID: <20220214102715.6ozlrp52ciukus4f@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Mon, Feb 14, 2022 at 11:16:24AM +0100, Marian Pompura wrote: > > Let's say: > > postgresql.conf configuration file on primary server: > > shared_preload_libraries = 'pg_stat_statements,xxxx' > > *Contrib package is installed on primary and replication server too. > > postgresql.conf configuratioj file on replication server > > shared_preload_libraries = '' is empty on replication server. > > In case some scenario which will include switchover or failover to > replication server. > How it will act ? Switchover will be successful but new primary node will > fail at startup process because shared_preload_libraries is empty but > extensions are created in database? Or it's better to pre-configure same > extensions into shared_preload_libraries parameter on replication server? Having some extension installed without the required shared_preload_libraries setting won't prevent postgres from starting. The only thing that won't work is using at least part of what the extension created on the database. So the question is whether you want to make sure you have the same feature available after a switchover, and if you do then yes you should make sure that you have a consistent configuration across all your nodes.