Re: Proposal - Reduce lock during first phase of VACUUM TRUNCATE from ACCESS EXCLUSIVE to EXCLUSIVE

2025-02-25 Thread Ramanathan
the lock based on waiting queries on the hot standby. Looking forward to your thoughts. Best regards, Ram ᐧ On Mon, 17 Feb 2025 at 20:50, Tom Lane wrote: > Ramanathan writes: > > I propose modifying the use of an EXCLUSIVE lock during the backward scan > > phase, then upgrad

Re: Proposal - Reduce lock during first phase of VACUUM TRUNCATE from ACCESS EXCLUSIVE to EXCLUSIVE

2025-02-17 Thread Ramanathan
Hi, The vacuum truncate operation consists of two phases: a backward scan of the heap [1] followed by the work to perform the actual truncation [2]. In the current implementation, both phases maintain an ACCESS EXCLUSIVE lock on the relation for the duration of the processing. The ACCESS EXCLUSIVE

"command cannot affect row a second time" in INSERT ... ON CONFLICT

2024-10-31 Thread Karthik Ramanathan
nsistent error message in both scenarios but it offers no real functional gains. 1. Is there a different reason the two queries produce a different error? 2. Is there a better way to think about the "command cannot affect row a second time"? Appreciate any guidance. Thanks. Warm regards, Karthi