Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a7TdG-0006dp-P2 for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Dec 2015 19:45:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a7TdG-0007Hb-9g for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Dec 2015 19:45:34 +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.84) (envelope-from ) id 1a7TdF-0007Gd-PZ for pgsql-hackers@postgresql.org; Fri, 11 Dec 2015 19:45:33 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a7TdC-0005wZ-Ah for pgsql-hackers@postgresql.org; Fri, 11 Dec 2015 19:45:33 +0000 Received: by mail-wm0-x22f.google.com with SMTP id c201so87420228wme.0 for ; Fri, 11 Dec 2015 11:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=aePwgqrvYWkhDgHFQBqiXBEpMMHGqoZXVZeJ7lc6OLo=; b=ac2+u26Tl4snPeE94y69f5F2MTVFWr++SMQDhrS98jGJDK1Q8WybihzxTIMEkCz+AM UuFte1JT7C13AMxzQSEVJS887v76x2sTqCNvpQLW5PC/hsYTQ25R70neBLQHKN76wY7H TzCqnEJRvEFt4oeaVSIDwZSZtfqX/KyfLfyN4oFrz5nHWQvGdZKWabCaodkuMrtnyqVR hhTKBoCIq6ka6oGCI8Y2cvse1V+zCIUTOOCgQYruFseRLoih1uP9UvvyxFg9fu7XQMGY XaTR1zBpJfzyiv2a0PdPwLNbU1wEau76I8vNuf5Wb0i0cV6iMTgskmCLWFIVXXr6GIYS sw0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=aePwgqrvYWkhDgHFQBqiXBEpMMHGqoZXVZeJ7lc6OLo=; b=Wd00b5PEBE+b9Na8pLbKqHOrkQ9egZNqMmvT91Gj58X9z974FAKJwWfrc3whRlbqRR lW4nfbU0syw/D0x9nmllJ+XXMwc7eug1qTVvotHywl6i1Qdd1qNcjZeczjjLVHqt6w39 9nxhTtNtTpiBOTrUjYnV0Yrp8O6Vw01qZh8tKD/u3GDZd9eBo2/sfFOo+pD2W5nAhy+y W4e1mPAFM7sB0xmQ3RGKjnbz4W51JS1e5ZTxPwpORJLe9lyxhkvXUH+XntRQKvDBKJmp GdwvI4jUw+gi8O3hNuZtDsRJOizOna/gxJczig8w6aHRcq2F8HbSkh+wU2SioECyU/g/ uKVw== X-Gm-Message-State: ALoCoQn338aZTaTW8xxcy/o/B6ZkVPburXlJfYm+dbeF7o0xxMEVpw077PXh6FiG4PTepFTgLlb7w7lDdkJjClOTXAlcD45IUbMUXuE4iBtRdvTecGIPYeKD3O6qotZku1EI9ldso6X5N/GOKCz1I4qnwXe+zUjikVX5oUY+s5WRz0wodnsw3ukNlR4ErQTVAfrMC5UqXFSeFylMzDxV8kj+Ip5rOB5VBg== X-Received: by 10.194.219.164 with SMTP id pp4mr25426613wjc.37.1449863129101; Fri, 11 Dec 2015 11:45:29 -0800 (PST) Received: from ?IPv6:2a00:1028:96c9:ee5a:bcf2:c8e0:5c3a:3c1? (dynamic-2a00-1028-96c9-ee5a-bcf2-c8e0-5c3a-03c1.ipv6.broadband.iol.cz. [2a00:1028:96c9:ee5a:bcf2:c8e0:5c3a:3c1]) by smtp.gmail.com with ESMTPSA id l128sm4699096wmf.10.2015.12.11.11.45.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Dec 2015 11:45:27 -0800 (PST) Subject: Re: Logical replication and multimaster To: Robert Haas , Andres Freund References: <565C7756.9070604@postgrespro.ru> <20151211101608.GN14789@awork2.anarazel.de> Cc: Craig Ringer , Simon Riggs , Konstantin Knizhnik , pgsql-hackers From: Petr Jelinek Message-ID: <566B27D6.8040709@2ndquadrant.com> Date: Fri, 11 Dec 2015 20:45:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2015-12-11 19:24, Robert Haas wrote: > On Fri, Dec 11, 2015 at 5:16 AM, Andres Freund wrote: >> On 2015-12-11 18:12:55 +0800, Craig Ringer wrote: >>> On 10 December 2015 at 03:19, Robert Haas wrote: >>>> On Sun, Dec 6, 2015 at 10:24 PM, Craig Ringer >>>> wrote: >>>>> * A way to securely make a libpq connection from a bgworker without >>>> messing >>>>> with passwords etc. Generate one-time cookies, sometihng like that. >>>> >>>> Why would you have the bgworker connect to the database via TCP >>>> instead of just doing whatever it wants to do directly? >> >>> pg_dump and pg_restore, mainly, for copying the initial database state. >> >> Well, you don't want to necessarily directly connect from the bgworker, >> but from processes started from a bgworker. I guess that's where a good >> bit of the Robert's confusion originated. > > That's part of it, yeah. I'm a little scared of this design. I mean, > I understand now why Craig wants to do this (thanks for explaining, > Craig!), but it seems like it's going to have a lot of the same > reliability problems that pg_upgrade does. I'm not saying there's a > better way to get the functionality, but it's pretty obvious that > depending on tools other than the server itself, and in particular > pg_dump, vastly increases the failure surface area. > Well, it's better than trying to write completely new catalogs dump tool for this. As Craig said, it would be best if pg_dump functionality was moved to functions in a backend, but that's probably not gonna happen tomorrow. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers