Re: determining the locks that will be held by a query

Поиск
Список
Период
Сортировка
Искать

Re: determining the locks that will be held by a query

От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Brian Cox  wrote: 
> I know that EXPLAIN will show the query plan. I know that pg_locks
> will show the locks currently held for activity transactions. Is
> there a way to determine what locks a query will hold when it is
> executed?
 
Only to read the docs regarding locking, and to desk-check your query,
at least as far as I know.
 
Keep in mind that some statements will only obtain locks if they find
rows that are affected, which might vary from one run to the next.
 
-Kevin

determining the locks that will be held by a query

От:
Brian Cox <brian.cox@ca.com>
Дата:
I sent this out on 4/7 and either missed a response or didn't get one. 
If this is the wrong forum, I'd appreciate a redirect.

I know that EXPLAIN will show the query plan. I know that pg_locks will
show the locks currently held for activity transactions. Is there a way
to determine what locks a query will hold when it is executed?

Thanks,
Brian
FAQ