Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTquH-0002to-PH for pgsql-general@arkaria.postgresql.org; Fri, 15 Jun 2018 15:44:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fTquG-0003jx-FL for pgsql-general@arkaria.postgresql.org; Fri, 15 Jun 2018 15:44:56 +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 1fTquG-0003jo-77 for pgsql-general@lists.postgresql.org; Fri, 15 Jun 2018 15:44:56 +0000 Received: from mail.i-mark.de ([188.138.104.222]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTqu7-0001xJ-Ky for pgsql-general@lists.postgresql.org; Fri, 15 Jun 2018 15:44:55 +0000 Received: from [192.168.178.20] (unknown [185.38.49.16]) by mail.i-mark.de (Postfix) with ESMTPSA id E6A7B158022A for ; Fri, 15 Jun 2018 17:44:41 +0200 (CEST) Authentication-Results: loft7616.startdedicated.de; spf=pass (sender IP is 185.38.49.16) smtp.mailfrom=andreas@a-kretschmer.de smtp.helo=[192.168.178.20] Received-SPF: pass (loft7616.startdedicated.de: connection is authenticated) Subject: Re: Append only replication over intermittent links (with local only delete?) To: pgsql-general@lists.postgresql.org References: From: Andreas Kretschmer Message-ID: Date: Fri, 15 Jun 2018 17:44:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am 14.06.2018 um 14:04 schrieb Uri Braun: > Hi, > > I'm looking to run Postgres -- flexible on exact version -- on some > devices installed in cars and replicated to a central server over cell > phone modems. I expect dropped connections due to: lack of coverage > (remote areas), dead spots, tunnels, cars parked in garages, device > power disconnected, etc. I expect all data to be generated on the car > devices and want it to eventually be copied over to the central > server. I would also like to be able to delete old data -- say months > old -- on the car equipment and NOT have those deletes propagate to > the central server. > > To be clear, the car device will surely add data -- append rows -- and > may very occasionally add a new table. I would expect the only case > where a delete may occur -- other than culling old data -- is during > recovery of a partial write or transaction rollbacks. The time > requirements are loose, but I would like replication consistency > within hours (once connected). > > I'm wondering what replication scheme is appropriate for this use case > and how to configure it appropriately. > i think pglogical can fit your requirements, please take a look: https://www.2ndquadrant.com/en/resources/pglogical/ Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com