Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPL/pgSQL scans all partitions at first time per each new session #210
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem description
PL/pgSQL scans all partitions at first time per each new session.
prepare enviroment
Tests
Make ACCESS EXCLUSIVE for one table in separate transaction:
SQL-request is good:
"Append (cost=0.00..20.70 rows=1070 width=49)"
" -> Seq Scan on journal_5 (cost=0.00..20.70 rows=1070 width=48)"
PL/pgSQL request is strange:
It'll be wait until the lock for journal_2 is released
Note: if release the lock and lock again, then execute function test() again in the same session, then everything will be good. The request won't be wait the lock release.
Environment