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 1kujB3-0000hG-Hd for pgsql-admin@arkaria.postgresql.org; Wed, 30 Dec 2020 21:38:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kujB2-0007LG-CN for pgsql-admin@arkaria.postgresql.org; Wed, 30 Dec 2020 21:38:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kujB2-0007L9-2i for pgsql-admin@lists.postgresql.org; Wed, 30 Dec 2020 21:38:40 +0000 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kujAx-0000g0-Au for pgsql-admin@postgresql.org; Wed, 30 Dec 2020 21:38:39 +0000 Received: by mail-qv1-xf29.google.com with SMTP id p12so8258252qvj.13 for ; Wed, 30 Dec 2020 13:38:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:date:subject:message-id :to; bh=1VRopj6kpMk6AZAtPIeKi1ykEBn4H1DJefQWd8cPCmw=; b=i9OJEY/kEvIout8f0RdNfBmeG6MbnBktmp4siXIFRApLpRVUl3SA4HCLZMgVN9RAhd ICF4WXFRVVlttxeIEp0V4i9rRRoUk92JC1g/xLWDatFQwz4NkO1VyOnzLoPcIP9EYJE9 5u3Y17n450/k79ZYy5tNJlljzHLngC3/p0jYLhXE1X3X9fO+pG2Lqs2rgRQcRkd5xbKl mxxJd5al3tz3pvhI+Ipeb/g0WVVZKbU7DtodaOFxlPVsvSQK3C6BXzACLu+9qHt3jn4z vuR7TwL3aO1vY79YqRNy+crxmrM8TvIc3+/GhVDaDbQbBbzdyjl/qg/ujWIbla9WEaX+ DFNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version:date :subject:message-id:to; bh=1VRopj6kpMk6AZAtPIeKi1ykEBn4H1DJefQWd8cPCmw=; b=XVft/y5sCHKtRDb4xkIuqQ2xhwzKtUGaWIEXBQsOBNO9OEOa4hGfyHAAUWuir2EoNk EcBO54Dnv6G0n1rfemD4hpbRZoxYjQ6FdVFwGl1Y7PZarfgJ/LDNh9ZmCrkhiyLgdThN BCZb1OgCmSTP6CBHYRogbim4/oTSFoPHtzDAhcsIRibbfoq8gIFqH6m0Z9lGoBJK5V3n OghJl1COWidBXjrlWfHDbHFWgeGDuBRsjA1PBQ2Xpu5gkuXIuxPMOHqh7XCwEfTa9lq1 DGORSLZ/HrB47peaJhGjtS0pmq38+Ii1mt6J7nwgWReejieHtqHvloshAqcixhhvOW7u DKOQ== X-Gm-Message-State: AOAM530cEI+OR918LNy7RV11A4WVelvUFKzsKKVszEFB/+uF1aKRquMp 3wvqlG9CDThWUZfa7JI8m7BypjeWlNDfBg== X-Google-Smtp-Source: ABdhPJwv1bdvCXrAA7dgqliaHLWIeLZHSWVuKNM8jzqgXzYA++JxRzAZGquZF5JDs2nXdIOws2VHSw== X-Received: by 2002:a05:6214:20a7:: with SMTP id 7mr58273439qvd.59.1609364313030; Wed, 30 Dec 2020 13:38:33 -0800 (PST) Received: from [192.168.254.67] (h178.165.133.40.static.ip.windstream.net. [40.133.165.178]) by smtp.gmail.com with ESMTPSA id g189sm8551329qkf.8.2020.12.30.13.38.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 13:38:32 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: John Scalia Mime-Version: 1.0 (1.0) Date: Wed, 30 Dec 2020 16:38:31 -0500 Subject: Creating a materialized view causing blocks Message-Id: <52BF172F-FF9F-4DAC-A9E4-A540D3E84D5E@gmail.com> To: pgsql-admin X-Mailer: iPad Mail (18B92) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Over last evening, one of my colleagues had begun recreating a materialized v= iew. =46rom looking at his code, it was only doing some selects, like one wo= uld expect, however, several API clients ended up being blocked by this, and= I=E2=80=99m attempting to understand why. I should note that a couple of th= e tables used here, contained more than 100 million rows, and I=E2=80=99m wo= ndering if the system simply gave up trying to keep the view=E2=80=99s data c= onsistency on par, and if a more than a non-exclusive read block was then im= posed. The API=E2=80=99s involved basically kept getting respawned, and at o= ne point there were more than 4000 attempted simultaneous connections. Not a= lot of fun, but fortunately for me, the application team only called the ot= her DBA to fix the issue. I=E2=80=99d still like to know what happened. =E2=80=94 Jay Sent from my iPad=