public inbox for [email protected]help / color / mirror / Atom feed
Review observations for partial REFRESH MATERIALIZED VIEW patc 3+ messages / 2 participants [nested] [flat]
* Review observations for partial REFRESH MATERIALIZED VIEW patc @ 2026-05-19 05:42 vellaipandiyan sm <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: vellaipandiyan sm @ 2026-05-19 05:42 UTC (permalink / raw) To: [email protected] 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 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Review observations for partial REFRESH MATERIALIZED VIEW patc @ 2026-05-19 09:59 Andreas Karlsson <[email protected]> parent: vellaipandiyan sm <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Andreas Karlsson @ 2026-05-19 09:59 UTC (permalink / raw) To: vellaipandiyan sm <[email protected]>; [email protected] On 5/19/26 7:42 AM, vellaipandiyan sm wrote: > 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. Hi, Thanks for the review, but please reply-all to the original thread when you review a patch so the original author and previous reviewers can see your review. If you do not have the original email thread you can go into the archive and request it to be sent to you so you can reply to it. You can click the "Resend email" link at https://www.postgresql.org/message-id/CAA4eK1KSEL%2Bb81L47MpdVCY79n0QgboxF6XTEjSc0ZcLkDzyWQ%40mail.g... -- Andreas Karlsson Percona ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Review observations for partial REFRESH MATERIALIZED VIEW patc @ 2026-05-19 10:04 Andreas Karlsson <[email protected]> parent: Andreas Karlsson <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Andreas Karlsson @ 2026-05-19 10:04 UTC (permalink / raw) To: vellaipandiyan sm <[email protected]>; [email protected] On 5/19/26 11:59 AM, Andreas Karlsson wrote: > You can click the "Resend email" link at https://www.postgresql.org/ > message-id/ > CAA4eK1KSEL%2Bb81L47MpdVCY79n0QgboxF6XTEjSc0ZcLkDzyWQ%40mail.gmail.com Sorry, somehow pasted the wrong link. https://www.postgresql.org/message-id/CAMjNa7d8f3sj-1ZsmsqiUPLzjXFtjOgeM7GFKvU_1EugyzJ5jw%40mail.gma... -- Andreas Karlsson Percona ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-05-19 10:04 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-05-19 05:42 Review observations for partial REFRESH MATERIALIZED VIEW patc vellaipandiyan sm <[email protected]> 2026-05-19 09:59 ` Andreas Karlsson <[email protected]> 2026-05-19 10:04 ` Andreas Karlsson <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox