Re: Postgres Locking

2023-10-31 Thread Tom Lane
"Dirschel, Steve" writes: > Above I can see PID 3740 is blocking PID 3707. The PK on table > wln_mart.ee_fact is ee_fact_id. I assume PID 3740 has updated a row > (but not committed it yet) that PID 3707 is also trying to update. Hmm. We can see that 3707 is waiting for 3740 to commit, because

Postgres Locking

2023-10-31 Thread Dirschel, Steve
Relatively new to Postgres. Running into a locking situation and I need to make sure I understand output. I found this query to show a lock tree: wldomart01a=> WITH wldomart01a-> RECURSIVE l AS ( wldomart01a(> SELECT pid, locktype, mode, granted, wldomart01a(>

Re: Postgres 15 SELECT query doesn't use index under RLS

2023-10-31 Thread Alexander Okulovich
Hi Tom, Can you force it in either direction with "set enable_seqscan = off" (resp. "set enable_indexscan = off")? If so, how do the estimated costs compare for the two plan shapes? Here are the results from the prod instance: seqscan off indexscan_off