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 1ghNSj-0008Jk-DS for pgsql-general@arkaria.postgresql.org; Wed, 09 Jan 2019 23:40:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ghNSi-0002P4-04 for pgsql-general@arkaria.postgresql.org; Wed, 09 Jan 2019 23:40:40 +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 1ghNSh-0002Nk-K5 for pgsql-general@lists.postgresql.org; Wed, 09 Jan 2019 23:40:39 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghNSZ-0005l0-Sz for pgsql-general@postgresql.org; Wed, 09 Jan 2019 23:40:38 +0000 Received: by mail-qk1-x741.google.com with SMTP id y78so5496416qka.12 for ; Wed, 09 Jan 2019 15:40:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zDTf4sraw0sRiCCWLIETjTIPdzQocVDc7reRUWtDXIo=; b=pSKaPt+WMhzx4iJNkzY1o8lRy8aO04m1m3hYN2U3W03qQwrAsnxz7tiHmMZpCsyBOm 8bKZ9SslLt/VLYwNJKprVS6VKZrVY7w0tAh/gnGj6qjvGt5CW9O2bRHFy91bjRgplnVK 8WSaeXOraXJoHaxwzhHlaK6FjCmBDE1uWWxmiHL6NdN0vHanSvPkdg+oL2g/WY27DU0u tXuV0MvS1OjjHmPFGX8P8pceYJuuVLu8cHw/pHGsOLZxOuqn6XKav2veVCSfVy6cThmI KGVtSkZhWbdDTtcWSPlrXJdH3k8OgXMcPm/d8tDpIluWbHeNNLOWtfhxwQ4BISn/f4C4 evWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=zDTf4sraw0sRiCCWLIETjTIPdzQocVDc7reRUWtDXIo=; b=aHlRLtQlMDyz+oprRK3fQh8saWtAjIrC4C3yx95kJ8PB1XIvGoItNDpmA3Twk2zXLY J1FDxJ4+kz5ZN/LdHtDWdoKaFpZ/kJa6wEfr4hpeeIiqEiVUBYd98ukHdRBxv3/sBWjS 0XQqjLamWtai2M5CsttO8rLUQIrdGy6QjftbXQL8U14fdoRJGzc6GN6NL1YfvTukNxfy WVOFPwOOfdLUmD6UFRYpYWvPUr3G5Z4w2w2ersVO7zDgqcL46Dtw+5IvbEiD72spj1Kf 6oiiHK6U2SxxnrdCJA+z9dfpO9fAt9IHClgt5d4+sygOM1w6zxuUee98bhuKSQsaQa0d FCjw== X-Gm-Message-State: AJcUuke8j2mekKxJY93BnJ5GFsomD11bafhcJvx0R1KZdOPEJUCudXOV 7d7oF3d7AwH7graqd67MS3tgiQwRr+GSQUUBoJCmjI+pwYf785R64T4w0+VTg86MXdfvVTqKFAU wbSTKgrR3CJulU0TaKJt330F+/KWoVyGCCQKSUWDPv/KhrkLFrD9D73FMANTcg3IBYuVApSn1Og 1jxaI= X-Google-Smtp-Source: ALg8bN63tmMbwVNxZwSjQu3Fo/4PbDks49OradRGCo8lOiXCZWRz9tO2wtAftGG3bj+SFk1m8Qvx2w== X-Received: by 2002:a37:4eca:: with SMTP id c193mr7213974qkb.37.1547077230656; Wed, 09 Jan 2019 15:40:30 -0800 (PST) Received: from alderaan.marques ([186.12.108.249]) by smtp.googlemail.com with ESMTPSA id m41sm48566876qtc.58.2019.01.09.15.40.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 15:40:29 -0800 (PST) Subject: Re: Pulling data from Postgres DB table for every 5 seconds. To: Mark Fletcher , github kran Cc: pgsql-general References: From: =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= Openpgp: preference=signencrypt Autocrypt: addr=martin@2ndquadrant.com; prefer-encrypt=mutual; keydata= mQENBFGQ9akBCAC+rCultjweJUjKgFfj0s3XQULnyNrC3N8C7Y2v5xPEw+EZAD6+kVDimItf jY2oZGdP8+dmfr79zVSx7IBN+BPXiz+8k+DnGrHchIrGoVcXbOomqqKBYDQYA1DvGU4Nfu3+ g7Iu3FFRdOuJkhW6mP+uXLs3VudM36Ksu9nnWSAtZ7+1k4klstwQEIJk+8xDIi2azJnLstY7 mPOEG2jOIhC0w2Wl6BWIQi0pJr/EjfZRgta4ZrbHnROJZubRcdaZxZmT1bWjrAdPRo3taJzm A82hIh4gTkaFRmiyDvMu8Iu1k1dw1bA4ranrs1MwBbnXZFjLpjXrtc82+btU7yQN4Kb9ABEB AAG0OU1hcnTDrW4gTWFycXXDqXMgKERCQSBBcmdlbnRpbmEpIDxtYXJ0aW5AMm5kcXVhZHJh bnQuY29tPokBPgQTAQIAKAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAlsCpfUFCQ00 FzQACgkQewO0SAEAVNKFygf+O2tIEXklaoSUhx2XM62NX7Ao8VaTaVBFZv1PFyKjqK96NZL6 oGjqO9z7LXjIWUatXVBH3Cxa4j/RNovWh0eNykIHZQN/gAYNB9eE8TmRRtj+S3D/rukwnu2s 16ALzEu5x2OABFEgj+/hH3JFViSC1mBnibFLYtTm4ydzL/URpObffgCeHXxBrHZ0o7XZsTBk 8UwNcsFpblSEdEpCZj/14UwAlEs5DPEMqn0I0hNHcVbliPKhy7CETJSet0hbpJvFqaJTbb0d p6i/Z8bHP0IrmYJWpkX5vH9oexYyPRM+nc1FXJnich3MtHfA/fTtGrM9XLWCt+NX5pdkHIUE ApfLXLkBDQRRkPWpAQgAoNxnsp7AIiOBT8ufUbTGFWNbOsViwFT7kMnQixNaR69S/YBxkWit BdogJA9D0y0j/qBEzY+XwZGVPLi4eYYRl0+u6qobpmgy2fIGaIyW8H20Zi8RYcjbixfLNrZV W0Wj4RDgiv1wnJqlTTu6sNtv1pHXfxnTxB27DHbQnNiBt/NC4gvy3TRIEzAECOg+unFtOxhS jx6uNRllU/uo7iPYUyJT5HyTNxYQQRK3h6wGhtMlxPi+0mY7TvsS0Pmvi5wWPQRRRs+waYbX A7lYXO1a1SCeR4KgTm3AXcj0iTPL7xxsMZQuPIaJMf/p9x4Ay4M9V6Mn02AvA6TQezL7NVsO gwARAQABiQElBBgBAgAPAhsMBQJbAqZ8BQkNNBfPAAoJEHsDtEgBAFTSItoH/2l15R9tmcRv zuNpsoYxpI2u+hvItRiXTN0Q5cOiiR7t03I1LjqSu66DhpvNCpWcQ05KUyrUH6S/GrDHHkbX 461XwdTjJDjQB8DiKmLRduf/CLD9uhpKDocGiazN0rJrLwDIok73YjCBiOV5CRmEyCoK1mNW suMNC6sMjNdBUi2ZOFAcrvG+RotsjDDGc0fRAV9UhykJuZuiE+no6f/WDu/iV2bAU832+/m1 5Nh06IDKazVMw/Twfkxm1NTTL6W/wcQIk0LjAFSDzgYud0i0lbe67R+Al94n+Zfp5slgsB4u xGH9NyG1PkFOSA8WyXSEWXbLPgXmZh/E6FqefUbHnjA= Message-ID: Date: Wed, 9 Jan 2019 20:40:26 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: es-AR Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk El 9/1/19 a las 20:22, Mark Fletcher escribió: > On Wed, Jan 9, 2019 at 12:58 PM github kran > wrote: > > > Mark - just curious to know on the logical replication. Do you think > I can use it for my use case where i need to publish data to a > subscriber when there is a change in the data updated for a row or > any new inserts happening on the table. Intention > is to send this data in Json format by collecting this modified data > in real time to a subscriber. > > From what you've said, it's a great use case for that feature. The one > thing to note is that you will have to code up a logical replication > client. If I can do it, pretty much anyone can, but it might take some > time to get things right. I wrote about some of what I found when > developing our client a year ago > here: https://wingedpig.com/2017/09/20/streaming-postgres-changes/ > > We ended up just using the included test output plugin that comes with > the postgresql distribution. And we didn't end up streaming to Kafka or > anything else first. We just take the data and insert it into our > elasticsearch cluster directly as we get it. I realy doubt that would work. Aurora doesn't have WALs, so how would you be able to decode the transactions? AFAIU, you can't use logical decoding on Aurora. Maybe you should be asking at the Aurora support channel. Regards, -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services