Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWMHE-0003Vn-G7 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 May 2019 14:43:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hWMHD-0005rg-3k for pgsql-hackers@arkaria.postgresql.org; Thu, 30 May 2019 14:43:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWMHA-0005rT-Up for pgsql-hackers@lists.postgresql.org; Thu, 30 May 2019 14:43:30 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hWMH7-0007Y8-O5 for pgsql-hackers@postgresql.org; Thu, 30 May 2019 14:43:27 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6C29721F41; Thu, 30 May 2019 10:43:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 30 May 2019 10:43:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=h4TP9HacxAIZ120rAJ1NzHTfQWC TlciK04tJZ74gxvU=; b=MXBl83lshT0SiVFC8dfK0AW9mEURa1x+5KSjmVdXoZi z5SoleGsmzWHMH12ECp6bzCx3kSX6fP+IhD+/e7v056fXZiRHMrJwPmT/GQQ1EVk BkzAyh1hPC8U4TaGsVbihtPbNvwUsAPfu0EiSOZWPGzMV7/K93ZF31x/eAf1qgf3 oh03PiI+4S+m0VzrfJvNQUN/pO+V08kPCmz+RiCQ4IO5hxnsffQvHzDL0RJlX++l I3lxoc7qot6xUkyTJsg5+jQFnTONToT0faXspfWrvZqUaVi/WRexLE4e3PzJyc5B yR3FpmRfsrjFZJ120hNUOSSgn+Ytb0wKUTmGCxtkznw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=h4TP9H acxAIZ120rAJ1NzHTfQWCTlciK04tJZ74gxvU=; b=yspL10EelhtjV+GYCGbc+N /ujqc8SR12wVlaRh07N7RsKXTqupVjh8tVFtzDoWfdPbKyUUjzjZlqOWbMr9f4v7 GV0JXQpNq4ehBQcpPMZ9VMlXZwKuyAgotiTc1IifGoKu5mjAGnsaV7JgLmLbLa1Y 5O6w405wyci4wemZenBfrB9rfajWL3SqTI7ZZSzD6gc/y2FSKSAQpuAt7Motqfwl UdmpEFPs/0/CXhAQBAXlRBHKhMntkpqzwPNyBUQVxvUVn6NinhQMbAl9zMhqRmvs GbOGyPBq1rEiP0F1F7/3zKuqg7tZN3aCTtCADjPAT9uOzRnZjGxA2FOw+BVmYl+A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddvledgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkphepud ejvddrheeirdduvddrudehnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshes rghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (unknown [172.56.12.15]) by mail.messagingengine.com (Postfix) with ESMTPA id A249D80068; Thu, 30 May 2019 10:43:23 -0400 (EDT) Date: Thu, 30 May 2019 07:17:23 -0700 From: Andres Freund To: Amit Khandekar Cc: tushar , Petr Jelinek , Robert Haas , Craig Ringer , Petr Jelinek , pgsql-hackers Subject: Re: Minimal logical decoding on standbys Message-ID: <20190530141723.ox5y4wda6alvo4uj@alap3.anarazel.de> References: <20190521161937.tpepqkiatw6kv35v@alap3.anarazel.de> <20190523155901.acm4umrl6adrcwt4@alap3.anarazel.de> <20190523174821.s3kgumgmo35opavg@alap3.anarazel.de> <20190527135602.dw6cp5vttbdb76i7@alap3.anarazel.de> 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: Precedence: bulk Hi, On 2019-05-30 19:46:26 +0530, Amit Khandekar wrote: > @@ -1042,7 +1042,8 @@ ReplicationSlotReserveWal(void) > if (!RecoveryInProgress() && SlotIsLogical(slot)) > { > .... > } > else > { > - restart_lsn = GetRedoRecPtr(); > + restart_lsn = SlotIsLogical(slot) ? > + GetXLogReplayRecPtr(&ThisTimeLineID) : GetRedoRecPtr(); > > But then when I do pg_create_logical_replication_slot(), it hangs in > DecodingContextFindStartpoint(), waiting to find new records > (XLogReadRecord). But just till the primary has logged the necessary WAL records? If you just do CHECKPOINT; or such on the primary, it should succeed quickly? Greetings, Andres Freund