Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1exni1-0002Mz-S7 for pgsql-docs@arkaria.postgresql.org; Mon, 19 Mar 2018 05:51:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1exni0-000805-CM for pgsql-docs@arkaria.postgresql.org; Mon, 19 Mar 2018 05:51:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1exni0-0007zw-4R for pgsql-docs@lists.postgresql.org; Mon, 19 Mar 2018 05:51:48 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1exnhw-000442-Pa for pgsql-docs@lists.postgresql.org; Mon, 19 Mar 2018 05:51:47 +0000 Received: by mail-lf0-x243.google.com with SMTP id z143-v6so17293500lff.3 for ; Sun, 18 Mar 2018 22:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=TZrQB69AHzDDzTz12c8bzt3Fynr5sI3RyTGP2pP9Uxc=; b=QiOnO2yl17/Os5p+7cTBJidrTl7ejR/WjiPdKXJDDXHp6Br7u2NnNvVDzO4rCTWd7E 8hfsUEOl+GG+gGDALKVa8rFYSnkLg8ZRdJPUuOQPqdtzCtDhIzd0P5sbtNM0xVeKaPEM IGSWlmx9hsXEu90JJl7+O18PQI/I73EK6ykyUJ6zi47X3DpQrnrefzY08IXz0rzk7ent /etpho9rLaKf/TH8AAImk25e11iouahp9e+BG7zHxfpBBonpymD1tl+Zwqi08YtYzowO fSCuCM1wEq3Nok61u8n7kc91U95Rw6lvQ5V9HItiI3JrQ0e7bEeJQEBn7gcbmMUGf0oW gAKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=TZrQB69AHzDDzTz12c8bzt3Fynr5sI3RyTGP2pP9Uxc=; b=alWDsvubxRXmthiTlhAGUUjycu9rLLVB8O2hJHKstfAd09qPozwCCimWoQdFOs00Di FEe/GX+nxljt0D7yp5k+t5ruARMFKsXazWU1WjMbxRAKR15mN2rFtQ7XEA2Noh7ehXhR tXQDkMTkAhPllV7XRByKbOdnr4rPen0pe9za1uhDK5U6o1s4ohWeU5mNIQIep04/iqHT DmDsdJFIPOTkGB88NjSkWlymiklnFcPhSwgY1BANFwU+Yz4069v8yFVLiX3KM28HHJAt aFuWIoIjqf5pXATXZxVjSa9A7+C1kb46Yrz8Kyf2WEhAx3veRyxJUiPSoCPHH069wa/e Lpig== X-Gm-Message-State: AElRT7E8lCU4fHrgwRd2wzlWhpWiSfx1Z5z0jg1ADJ/wMKkLtEdv8vfp pS9ur4yFCbVVNcCr5sVfl1cGpsTuV7Zm/Z8M/+4= X-Google-Smtp-Source: AG47ELvgxecuFC28cJZVDCOUmv7rDp07WUCamAz/fopA2yfxJ2p6zNLvaFASNaER/HdFcq80/qrnZPuD8BoXSivJGQA= X-Received: by 2002:a19:dd4c:: with SMTP id u73-v6mr7391354lfg.145.1521438702636; Sun, 18 Mar 2018 22:51:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg k Date: Mon, 19 Mar 2018 05:51:32 +0000 Message-ID: Subject: Re: Postgres 10 and the pg_ctl "--wait" option To: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000006b17a30567bd8daa" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000006b17a30567bd8daa Content-Type: text/plain; charset="UTF-8" This seems to be different behaviour between pg9.5 and pg10. Pg9.5 does not give a connection error once "pg_ctl --wait ..." finishes. So I've moved this to the pgsql-bugs list. Greg On Fri, 2 Mar 2018 at 17:04 Greg k wrote: > In PostreSql 10, the documentation for pg_ctl and the "--wait" option says > "Startup is considered complete when the PID file indicates that the server > is ready to accept connections." > > When I do a point-in-time recovery followed by a start with > "/usr/pgsql-10/bin/pg_ctl start -D /data -w -t 86400", I then try to > connect immediately after pg_ctl finishes. But I get a connection error > "psql: FATAL: the database system is starting up" . It seems the > postmaster.pid file state goes from 'starting' to 'standby' to 'ready' but > pg_ctl is saying the server is ready to accept connections when the > postmaster.pid file says 'standby'. Am I misunderstanding the documentation? > > Thanks, > Greg > --0000000000006b17a30567bd8daa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This seems to be different behaviour between pg9.5 and pg1= 0. Pg9.5 does not give a connection error once "pg_ctl --wait ..."= ; finishes. So I've moved this to the pgsql-bugs list.

Greg

On Fri, = 2 Mar 2018 at 17:04 Greg k <gregg= .kay@gmail.com> wrote:
In PostreSql 10, the documentation for pg_ctl and the &quo= t;--wait" option says "Startup is considered complete when the PI= D file indicates that the server is ready to accept connections."

When I do a point-in-time recovery followed by a start= with "/usr/pgsql-10/bin/pg_ctl start -D /data -w -t 86400", I th= en try to connect immediately after pg_ctl finishes. But I get a connection= error "psql: FATAL:=C2=A0 the database system is starting up" . = It seems the postmaster.pid file state goes from 'starting' to '= ;standby' to 'ready' but pg_ctl is saying the server is ready t= o accept connections when the postmaster.pid file says 'standby'. A= m I misunderstanding the documentation?

Thanks,
Greg
--0000000000006b17a30567bd8daa--