| From: | vellaipandiyan sm <vellaipandiyan(dot)sm(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Review observations for partial REFRESH MATERIALIZED VIEW patc |
| Date: | 2026-05-19 05:42:51 |
| Message-ID: | CAGXjcjkHK8kNeTPzcvDDVZ_rjV4FwPFCncvwhhpOZooWa_VD1g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello hackers,
I reviewed the REFRESH MATERIALIZED VIEW ... WHERE patch and had a few
questions around concurrency semantics.
- The original DELETE -> INSERT approach exposing a consistency gap
makes sense, especially once tuple locks disappear after DELETE. The newer
FOR UPDATE + single-CTE approach seems safer, though I wonder whether
overlapping refreshes could still encounter deadlock scenarios around
UPSERT conflicts.
- The CONCURRENTLY behavior also feels somewhat unintuitive here. With
WHERE refreshes, the non-CONCURRENT path appears more permissive for
writers than CONCURRENTLY WHERE, which seems opposite to the expectation
established by normal REFRESH MATERIALIZED VIEW semantics.
- It may also help to document the intended guarantees around
overlapping partial refreshes and concurrent DML on base tables.
Overall, the use case seems quite valuable for selective high-churn refresh
workloads.
Thanks for working on this patch.
Regards,
Vellaipandiyan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-05-19 05:55:14 | Fix pg_stat_wal_receiver to show CONNECTING status |
| Previous Message | solai v | 2026-05-19 05:31:27 | Re: [PATCH] Rebuild CHECK constraints after generated column SET EXPRESSION |