Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIkn3-0002Pp-HO for psycopg@arkaria.postgresql.org; Sat, 03 Nov 2018 01:31:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gIkn1-0005pY-Rz for psycopg@arkaria.postgresql.org; Sat, 03 Nov 2018 01:31:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIkn1-0005pC-Fq for psycopg@lists.postgresql.org; Sat, 03 Nov 2018 01:31:51 +0000 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gIkmy-0004ZE-KW for psycopg@postgresql.org; Sat, 03 Nov 2018 01:31:50 +0000 Received: by mail-qk1-x729.google.com with SMTP id d135so5958621qkc.12 for ; Fri, 02 Nov 2018 18:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=excoventures-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=TVtE6Vg7ZwMJIoS4gECCCzJIF3u0OoQ6mbR1r3rdMSE=; b=HU+CQUnDDuYlpiFVbyKJy8qlBxyICls9gXxlHAH5A0imn6a6SrYSPT+7knU3DXZrij l5UCoc5f3BuoFuVDEgQq4wThmU26JvYglpfHhvo9tT5uKehE9bwAtYXPWTqg7bEaPmvP J+0ubU3/DwTdbr+fEIaajYx4uzaE21tvCalfElJV+CAaN2YS9+w4uNkZTY3TV5C4AUhZ lL/daNLEeNGXQe6UKYWmxc5zzyrCj3M89A5jHlONLnURJ6gxiXAvLnvhR5R2UAW4oxNn DuK4TqWjGpCk8YqwKfGMWiDIi8w4nz0kmAOy+QfazfFLm63Uamia185kydD6l5Af/QiN DZqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=TVtE6Vg7ZwMJIoS4gECCCzJIF3u0OoQ6mbR1r3rdMSE=; b=CRCNhviHbvlzIosyj184ojDGJkzaNOEo8xYw818SIYdyp5OvxFbgWz7GRv9R+olNWr PIob5omMnTHasheQEyYx89LsjVd7ZauoxNyIfTfuCt54cjE03v3LQAOrLI7WH6LLfxOv hF8c/6mHrMZIy0AAxm236VX0BUoCdhI9z3B9lvNumjtpg9J6i7sfoGWAZlrKh8JoDoRU RP/0bDCbA8xQs/op+xv+pCF5H/iVpffw9CpDNWgLeGM7Vqlg1SxnLh0tBkc2bVvuxcnI iYIP08ex3Nt8g/rS47dMhvoZR6vVxk3HGJjnxvXr2LgkGtfjQxuqdfTGpB7DO9t3vS+s IUBQ== X-Gm-Message-State: AGRZ1gKfdYZyv9w6UoCH92qfTR2IKR0fxfHTrYeDXVjznfhR/v9QbQ0i Gk2M09SFwOo8jXP+HsBnqiw4pNZHGR8= X-Google-Smtp-Source: AJdET5eOgPOmc9RggJ0cSYwEQE+DQ8BXlwLEOwfYrXFfoknm9z35wpc3jyIy6S5t8cepniJlHfFyEw== X-Received: by 2002:aed:220f:: with SMTP id n15-v6mr12550230qtc.288.1541208707037; Fri, 02 Nov 2018 18:31:47 -0700 (PDT) Received: from ph33r-retina.home (pool-96-246-147-25.nycmny.fios.verizon.net. [96.246.147.25]) by smtp.gmail.com with ESMTPSA id h66-v6sm23203799qkc.53.2018.11.02.18.31.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Nov 2018 18:31:46 -0700 (PDT) From: "Jonathan S. Katz" Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_103A9038-776C-4ED7-BC99-CACBA5CC43B8"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Multiple message delivery on logical replication Date: Fri, 2 Nov 2018 21:31:45 -0400 In-Reply-To: Cc: psycopg@postgresql.org To: Christophe Pettus References: X-Mailer: Apple Mail (2.3273) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_103A9038-776C-4ED7-BC99-CACBA5CC43B8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Nov 2, 2018, at 9:28 PM, Christophe Pettus = wrote: >=20 > I'm working with the logical replication support in psycopg2, and have = found something surprising... this may be my error, of course! >=20 > My sample program is below. It works wonderfully, but in the case = when it starts, it re-receives the last message that it handled, even = with flushing it. I=E2=80=99ve had this happen as well. IIRC it was when I was using it in = async mode with wal2json. =46rom the investigating I did at the time, I = thought it was a bug with wal2json instead of psycopg2, but it was awhile ago and my memory is fuzzy :( Jonathan --Apple-Mail=_103A9038-776C-4ED7-BC99-CACBA5CC43B8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE+oS2la8r95ogZD/x8QSccp8cZScFAlvc+oEACgkQ8QSccp8c ZSeBShAAp1HurnYDfdlgAJo1ZJLB5yrkIljMCaVz8n75icfuG0cJj+OpFYJQPJ8w /wuLw9B7drm6+tibUSrAqg7/gi1uczHXrvZXB+zHXriuOKv7LPH22sr/XT5X2xu4 cPtLGAsbCx5iK2niZdC2jDjdwCJgQCd5hCdmCkD9kXKfY/ittn5LAbUsFTJk/Wqu 78NeqYEr5iX5c2/am2lR8gictC48LVqYkOhpYtlfBsrxIRWO7jeM+WpvJWrqm58v hSzNtPqEhyzlOcW84CXSmcyqhWLNOALzFya4aoUilVKM2mr2dUG1TQNoRIoD31XV 2G4mZXPwIZ/4fcYerxr1TVu7oq0A9gaROozMqy3cI2vFgBGKt3g990aTHQVQ6XIk 6Iwexm/Jn0deDnW15E+LrJJNFysS8yqLXBt/SPGyvpnTKbGODKp8YG19V+mhep4z B+uxPz47yOfAn+6jsx0gNbAmvdc8NTD8YbHyLv8fYYqH/37cxMwlzJ2//8AKk2Gr UYuetl4SUXNZTjcLl5/hsjxm/XsvEp2Vk4+DQwdQQTGlrjKR8Bg7PUV8xHxr3SSY QBPRUB9Li+EG4ePo9o5fvJkovZ+rXMukScLYozzBktn3N6OLexjIwHRSH3QHBPc8 u1T9ScXZ0giESquS9jpD9DDbAoSixyceGfJcNAiedHZuH74uYFc= =fQg9 -----END PGP SIGNATURE----- --Apple-Mail=_103A9038-776C-4ED7-BC99-CACBA5CC43B8--