Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tm1Fz-003TJh-6N for pgsql-general@arkaria.postgresql.org; Sun, 23 Feb 2025 01:58:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tm1Fx-002u4k-Gp for pgsql-general@arkaria.postgresql.org; Sun, 23 Feb 2025 01:58:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tm1Fx-002u4b-5L for pgsql-general@lists.postgresql.org; Sun, 23 Feb 2025 01:58:09 +0000 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tm1Fu-000FRk-08 for pgsql-general@lists.postgresql.org; Sun, 23 Feb 2025 01:58:08 +0000 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-5fcd811d939so2435022eaf.0 for ; Sat, 22 Feb 2025 17:58:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=caktusgroup.com; s=google; t=1740275884; x=1740880684; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qG0NmIYNRIlh6okoRr5v7W/haT4Bq/xATJq/z5sX2+s=; b=GDXFTywMTUfu5+1ziLCfL2HrwtTRTnVq/qwKi82XnL/FDQL8tKzd0J57yvl3ItcB7Q jj3rT0yDKIUybr3QvB7pHf5qXqL94wqs785Qg7kfIq37TNSDcNaq7IyNYSzIZPL6r3c/ qWcsTr9i0G93jBr/VnK/4EHNG7JEmjofWfVixWqLtnG/6EP/rbnI1cryIYCVDljfLJGq yLzPYuaRje9ZdL7cNl2bfeIz6pB/HscZ4qrW3zrKatoHbsCXXsX23fQK+8nTxNC5+53n njHLkO1ukgIZtHnhJretNkDd6mfCvcjJe28axt6PMmyjIGOWlOabwljh6AANTPmRfWsI Yk5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740275884; x=1740880684; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qG0NmIYNRIlh6okoRr5v7W/haT4Bq/xATJq/z5sX2+s=; b=HZT8+xMRQT65XmBJYTFHpbQEAlPsMPPnaxeaLkfwHXtKiNN4wsqM3pY8fq+96TnIOc Z+vn7KJGxDLcnb5vFV6/evUzYNR9lMHb93zNgLSlv06ZZajiWisA1gZCEwojSZywroZ8 MtmaJdXmJzdxK1Ucwe/la2+wNEK8SNlSd2sIiEo+qPB1tfXmXhmgJdwDdeMx4fmSLaO+ 9k+virMgqKp5cUq6t2AUQPlwCm57FnVmaZk65dDoZCHuflIaQhJ5TPYBGbv+xTxeFV+P rV7ej+ZuEN1dayAM4zIvk7TV61nB8y0ZokaCVwTHO1g/RO0MOwPwu5bE+7hZGCt7RqLP gDGA== X-Gm-Message-State: AOJu0YyZ6oMravdnDmCtiqt15C2JYaXn2tIFzCj26XGQ/vU47/69IOyN rlSad/RdNhfJP16Ah+tCiOcNherBYS3ZYKWbF1PefrAw1Lh3n+QInmARaeYteGWBBbNPF+MwBGg t4f3ZZdl4UTbCBj+CzQer+DwxyCnaJNq6rGrri6nNbT8gAYcU/LB2Yw== X-Gm-Gg: ASbGncuICaGM/2HUNkgQLdxQ9dPk0f1qovQEwL4a2uzNlEVmKofcPbOxNAvpTk+rbUs pnaEoZ9SnAs33FXmJzBYTkC62MbDsClPhrdaBuRIZP/boe/cK+9IuI6uUImd1j32S57uVd4IYfY y0ZtwqQ94= X-Google-Smtp-Source: AGHT+IGUndNOwcCWfD0pEh2U476lidRqJTrV9FcZHw4eslCXtGE/pz2yHK4OR/ZuBjArBjqjJAilX7cOGIgSyWeXXpY= X-Received: by 2002:a05:6808:2e93:b0:3f3:fe34:4262 with SMTP id 5614622812f47-3f419f12e25mr10185077b6e.11.1740275883690; Sat, 22 Feb 2025 17:58:03 -0800 (PST) MIME-Version: 1.0 From: Tobias McNulty Date: Sat, 22 Feb 2025 20:57:52 -0500 X-Gm-Features: AWEUYZlyAZj4HAhP-qVkncal2Y6UJLV1ThNTOY8aLBBedbb3ZptqLGw05t0URio Message-ID: Subject: documentation question regarding REFRESH MATERIALIZED VIEW CONCURRENTLY To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, The documentation [1] for REFRESH MATERIALIZED VIEW states that the "CONCURRENTLY" parameter: > Refresh[es] the materialized view without locking out concurrent selects on the materialized > view. Without this option a refresh which affects a lot of rows will tend to use fewer > resources and complete more quickly, but could block other connections which are trying to > read from the materialized view. This option may be faster in cases where a small number > of rows are affected. I can read the phrase "affects a lot of rows" in two ways. Specifically, either that (1) the refresh operation actually updates the contents of a lot of rows in the materialized view, or (2) that the materialized view itself contains a lot of rows, regardless of whether or not they change with each refresh. Could someone knowledgeable in this area possibly clarify which of these is the correct interpretation, or if there is another interpretation I may be missing? Thanks in advance for your help. Tobias [1] https://www.postgresql.org/docs/17/sql-refreshmaterializedview.html