forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2e10863
committed
Now that we allow ANALYZE to run inside a transaction block, the locks
it takes could be held for quite awhile after the analyze step completes.Rethink locking of pg_statistic in light of this fact. The originalscheme took an exclusive lock on pg_statistic, which was okay when thelock could be expected to be released shortly, but that doesn't holdanymore. Back off to a normal writer's lock (RowExclusiveLock). Thisallows concurrent ANALYZE of nonoverlapping sets of tables, at the pricethat concurrent ANALYZEs of the same table may fail with 'tupleconcurrently updated'.1 parent5c3102d commit2e10863
1 file changed
+13
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
1644 | 1644 | | |
1645 | 1645 | | |
1646 | 1646 | | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
1647 | 1656 | | |
1648 | 1657 | | |
1649 | 1658 | | |
1650 | 1659 | | |
1651 | 1660 | | |
1652 | 1661 | | |
1653 | 1662 | | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
| 1663 | + | |
1660 | 1664 | | |
1661 | 1665 | | |
1662 | 1666 | | |
| |||
1789 | 1793 | | |
1790 | 1794 | | |
1791 | 1795 | | |
1792 | | - | |
1793 | | - | |
| 1796 | + | |
1794 | 1797 | | |
0 commit comments
Comments
(0)