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 1j19d6-0001o3-AV for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2020 14:01:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j19d3-0005p7-Nz for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Feb 2020 14:01:37 +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 1j19d3-0005p0-5c for pgsql-hackers@lists.postgresql.org; Mon, 10 Feb 2020 14:01:37 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j19cv-0002aU-F2 for pgsql-hackers@postgresql.org; Mon, 10 Feb 2020 14:01:35 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 3B41521C4C8E; Mon, 10 Feb 2020 17:01:26 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from ars-thinkpad (nat03-43-2.netorn.net [188.35.130.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 62C7421C4C87; Mon, 10 Feb 2020 17:01:25 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1581343286; bh=DFwR10a33yk8OtSS7X1ALUccxlxnjjuUlcP9QNFEgNk=; h=References:From:To:Cc:Subject:In-reply-to:Date; b=IxVXJiL9fhdE4toY3sXauRwT1Y9c8SVG1bBfK2FxoHPF/lD++Ai72dydkqkR5RH99 XdTlwB3nO38RGqqQF2Bhb1LBx/ecA8IwWlf1sXYLLGQIlIX34bZgehLSlPrMCXvfJO pThdv3FwTmxdHzCDVrAEw+DXPT+zSISJeKTY9cho= References: <871rr3ohbo.fsf@ars-thinkpad> User-agent: mu4e 1.1.0; emacs 26.0.50 From: Arseny Sher To: Masahiko Sawada Cc: PostgreSQL Hackers , Alvaro Herrera Subject: Re: logical copy_replication_slot issues In-reply-to: Date: Mon, 10 Feb 2020 17:01:25 +0300 Message-ID: <87v9oelex6.fsf@ars-thinkpad> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Masahiko Sawada writes: > I've attached the draft patch fixing this issue but I'll continue > investigating it more deeply. There also should be a check that source slot itself has consistent snapshot (valid confirmed_flush) -- otherwise it might be possible to create not initialized slot which is probably not an error, but weird and somewhat meaningless. Paranoically, this ought to be checked in both src slot lookups. With this patch it seems like the only thing create_logical_replication_slot does is ReplicationSlotCreate, which questions the usefulness of this function. On the second look, CreateInitDecodingContext checks plugin sanity (ensures it exists), so probably it's fine. -- cheers, arseny