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 1ojPmZ-0002p0-1t for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Oct 2022 18:51:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ojPmX-0007TI-Cr for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Oct 2022 18:51:41 +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 1ojPmX-0007T9-1k for pgsql-hackers@lists.postgresql.org; Fri, 14 Oct 2022 18:51:41 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ojPmQ-0003Hy-Cq for pgsql-hackers@postgresql.org; Fri, 14 Oct 2022 18:51:39 +0000 Received: by mail-pg1-x533.google.com with SMTP id e129so5057686pgc.9 for ; Fri, 14 Oct 2022 11:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MrZC4YvS5FlGaDyYo3mF5+GBZ8vef7YXFWIXmLRUAaU=; b=lFCUq2QsobPAnfV478M4hVPJoh0neI4LtXriMVs/+oLA//QCbKiGV3/RjxImtqQXi+ mzRP0W1t44EfnlQj9QB26e8KznJj2m9ws2oOih8+H5N6kLInrWLhuKIe3pyklK0UZPq9 o5hFyN7n0vHwDWUCxYdVyhjE8nc88g0tbnSHbWadS8zFhbk44+4Eq4b8Xn8YfzohQU1J 9Z6iWDYjmLT6AdMWdQ4/6jmANeh3rK+lqGV9+gCNfL7U5ibE43oRXD5Wa8MgfWc5JQm9 j4fcCNfy3ouQXBSZZ0x0i6UrDyxe3wlryJQQmEJzFNBF4P4m/BaiMZxtS8qR+vtzPhrF 1Ipw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MrZC4YvS5FlGaDyYo3mF5+GBZ8vef7YXFWIXmLRUAaU=; b=7UeTLo0ocSopOUybPr+7a6AYyPCHzyVCtpfO5HDMs6JgSZgVor5WxNfisrtpRYDoMP 0vzbi622Dczgx+cWywFOJhQrEnBZDbaBNjwrGtWlJjlKKFotCkVql+hIvkrRwk/vUJZU 4+PaxOWIGJEa5trGNeUgfgapPrsBg/Byoe0Y0OSY1p8w1maN61AISIfgsk1id2D4yP+N HORPi6xgl/wQmAMY+S9wDmy39IIx3ZZeE+aTxHT0gEcZEELPHjMTkkc38e4+Bjxw7iEi AgLEjuJRcopp9Cj0L0mA+t+W+TO93+zprmUmWwa1ufm3unZwKNkTkJ2VIJDUaXhCQAHx gNfA== X-Gm-Message-State: ACrzQf13zj/MhXvi1MAAEAL48gLT92zImH9T9H6Z9cikTn8O0ntJHrUJ mJ9ygRRSd6TPZLP0EgO4ZI0= X-Google-Smtp-Source: AMsMyM6/nDR9sP4u8tDwIpL9ArCRgjUCqs+9ALHA3Sj7NZdKpS6orb5nT2rx7kxVvXKGpwGiZoGhTA== X-Received: by 2002:a63:f921:0:b0:46b:18b:fe4d with SMTP id h33-20020a63f921000000b0046b018bfe4dmr5827840pgi.573.1665773493128; Fri, 14 Oct 2022 11:51:33 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id q22-20020aa79616000000b0053e468a78a8sm2080044pfg.158.2022.10.14.11.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 11:51:32 -0700 (PDT) Date: Fri, 14 Oct 2022 11:51:30 -0700 From: Nathan Bossart To: Bharath Rupireddy Cc: Michael Paquier , Tom Lane , Peter Eisentraut , Benoit =?iso-8859-1?Q?Lobr=E9au?= , Alvaro Herrera , Robert Haas , "Bossart, Nathan" , David Steele , Fujii Masao , "pgsql-hackers@postgresql.org" , Magnus Hagander , Stephen Frost Subject: Re: archive modules Message-ID: <20221014185130.GC1678424@nathanxps13> References: <20220923161402.GA736566@nathanxps13> <4f66de67-35a0-3fe7-fa61-d618e1bd2c2c@enterprisedb.com> <20221005185716.GB201192@nathanxps13> <1d9cb989-91b0-919e-f42b-4788f5fc7911@enterprisedb.com> <20221013182408.GA1551106@nathanxps13> <1061703.1665687218@sss.pgh.pa.us> 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 On Fri, Oct 14, 2022 at 12:10:18PM +0530, Bharath Rupireddy wrote: > + ereport(ERROR, > + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > + errmsg("both archive_command and archive_library specified"), > + errdetail("Only one of archive_command, > archive_library may be set."))); > > The above errmsg looks informational. Can we just say something like > below? It doesn't require errdetail as the errmsg says it all. See > the other instances elsewhere [2]. > > ereport(ERROR, > (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > errmsg("cannot specify both \"archive_command\" and > \"archive_library\""))); I modeled this after the ERROR that error_multiple_recovery_targets() emits. I don't think there's really any material difference between your proposal and mine, but I don't have a strong opinion. > 2) I think we have a problem - set archive_mode and archive_library > and start the server, then set archive_command, reload the conf, see > [3] - the archiver needs to error out right? The archiver gets > restarted whenever archive_library changes but not when > archive_command changes. I think the right place for the error is > after or at the end of HandlePgArchInterrupts(). Good catch. You are right, this is broken. I believe that we need to check for the misconfiguration in HandlePgArchInterrupts() in addition to LoadArchiveLibrary(). I will work on fixing this. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com