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 1jgfZ7-0002T0-Sp for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2020 02:25:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jgfZ4-0006iq-Jj for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2020 02:25:06 +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 1jgfZ4-0006ij-89 for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2020 02:25:06 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jgfZ1-0002NP-7R for pgsql-hackers@postgresql.org; Thu, 04 Jun 2020 02:25:05 +0000 Received: by mail-qk1-x742.google.com with SMTP id g28so4596922qkl.0 for ; Wed, 03 Jun 2020 19:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=JObBdDRGAk1UL8sEG9dQZXz/jpEtF1dskBUVeUj0dIc=; b=RwuKYzQdwgsQaFNeAOfDJgn3Pa6pXw5Xb9yohcyNo4Vc5BKirJzCLj9m3z21BDT9FP x9m3O1zK8EenBbYO1lHvgjW7RiFZ3JOQH727EhhtnYp7z8kIZYurGIDT68+/1Gj0nJ2t +wE0ZzJ/SaGbpMz+5hY2kqqGVAZM8yW4Kpm91MQlA1vSC4FqJbOeSo6j2wun/xyOi/il czuelW5azytf76H8yOlIZl3533gQlzsltaxPoOujNj62CLR278Onst2KeskQNYZJoS+U dtKhsx0z2XbAOIQ5uouTd20eHK4rtykoZtRrNE0fSCoXO0ZiKJ6huLm6o1t7EnXhocno /Xzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=JObBdDRGAk1UL8sEG9dQZXz/jpEtF1dskBUVeUj0dIc=; b=hZ6TTaTMS1hHaepNZz/fhkYljDUE5ZIlWj4u8Zg3RbwMshN6Vi599RQhweBOfqnccE u4RropUBHKCSZxQdIfDluGYJDPQeyPj63QUa3BlJ1u/sB7jaIsvG2rZMGbT8l7T4Gd8X S56Urb/qhttMX5fjrcqQGq4vXaNSxYW3ZJBCNHCWL2wMMzKR6nh21hehz6MFR+RTa1Hq ZoNytHMyw7POwheMU/um+eDf0R9nk3N42MVMkgBuQW8KiWGtsysfH8slyoSfv8q00kBt 28veCUB3tpS81JfrfWMO3KcRnYzqw6l2ZRqaU5MDufk+itcOGDenXsbSaXjEG7vma9ry tMNA== X-Gm-Message-State: AOAM530B1M8E2F3u2oXTpf72iJ+ePsYRmsrlhVHnMiuJsWFK3LJ7OWEg G46J6ym/dCBOFqlL8FNumaBF1g== X-Google-Smtp-Source: ABdhPJz43TxU0fdvBkr7Fg7O4UuqWOtjXghpnAM+JiMFvC08vTW5b3u3AUXUWVrm8L2n1+E9OYWRQQ== X-Received: by 2002:a05:620a:126c:: with SMTP id b12mr2636587qkl.7.1591237502475; Wed, 03 Jun 2020 19:25:02 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id r138sm2916509qka.56.2020.06.03.19.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 19:25:01 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 0CF273007F6; Wed, 3 Jun 2020 22:25:00 -0400 (-04) Date: Wed, 3 Jun 2020 22:25:00 -0400 From: Alvaro Herrera To: Andres Freund Cc: Fujii Masao , Michael Paquier , Masahiko Sawada , Kyotaro Horiguchi , sitnikov.vladimir@gmail.com, PostgreSQL-development Subject: Re: SIGSEGV from START_REPLICATION 0/XXXXXXX in XLogSendPhysical () at walsender.c:2762 Message-ID: <20200604022500.GA23786@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200604013311.virtnjcrqj3fgs34@alap3.anarazel.de> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jun-03, Andres Freund wrote: > On 2020-06-03 18:27:12 -0400, Alvaro Herrera wrote: > > On 2020-Jun-03, Andres Freund wrote: > > > I don't think we should prohibit this. For one, it'd probably break some > > > clients, without a meaningful need. > > > > There *is* a need, namely to keep complexity down. This is quite > > convoluted, it's got a lot of historical baggage because of the way it > > was implemented, and it's very difficult to understand. The greatest > > motive I see is to make this easier to understand, so that it is easier > > to modify and improve in the future. > > That seems like a possibly convincing argument for not introducing the > capability, but doesn't seem strong enough to remove it. This "capability" has never been introduced. The fact that it's there is just an accident. In fact, it's not a capability, since the feature (physical replication) is invoked differently -- namely, using a physical replication connection. JDBC uses a logical replication connection for it only because they never realized that they were supposed to do differently, because we failed to throw the correct error message in the first place. > > I don't think having a physical replication connection access catalog > > data directly is a great idea. We already have gadgets like > > IDENTIFY_SYSTEM for physical replication that can do that, and if you > > need particular settings you can use SHOW (commit d1ecd539477). If > > there was a strong need for even more than that, we can add something to > > the grammar. > > Those special case things are a bad idea, and we shouldn't introduce > more. What special case things? The replication connection has never been supposed to run SQL. That's why we have SHOW in the replication grammar. > It's unrealistic that we can ever make that support everything, > and since we already have to support the database connected thing, I > don't see the point. A logical replication connection is not supposed to be used for physical replication. That's just going to make more bugs appear. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services