forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitee32b82
committed
Lock table in DROP STATISTICS
The DROP STATISTICS code failed to properly lock the table, leading to ERROR: tuple concurrently deletedwhen executed concurrently with ANALYZE.Fixed by modifying RemoveStatisticsById() to acquire the same lock asANALYZE. This function is called only by DROP STATISTICS, as ANALYZEcalls RemoveStatisticsDataById() directly.Reported by Justin Pryzby, fix by me. Backpatch through 12. The code waslike this since it was introduced in 10, but older releases are EOL.Reported-by: Justin PryzbyReviewed-by: Tom LaneBackpatch-through: 12Discussion:https://postgr.es/m/ZUuk-8CfbYeq6g_u@pryzbyj20231 parentf474826 commitee32b82
1 file changed
+15
-8
lines changedLines changed: 15 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
734 | 734 |
| |
735 | 735 |
| |
736 | 736 |
| |
| 737 | + | |
737 | 738 |
| |
738 | 739 |
| |
739 | 740 |
| |
740 | 741 |
| |
741 |
| - | |
742 |
| - | |
743 |
| - | |
744 |
| - | |
745 |
| - | |
746 |
| - | |
747 |
| - | |
748 |
| - | |
749 | 742 |
| |
750 | 743 |
| |
751 | 744 |
| |
| |||
760 | 753 |
| |
761 | 754 |
| |
762 | 755 |
| |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
763 | 767 |
| |
764 | 768 |
| |
765 | 769 |
| |
766 | 770 |
| |
767 | 771 |
| |
768 | 772 |
| |
| 773 | + | |
| 774 | + | |
| 775 | + | |
769 | 776 |
| |
770 | 777 |
| |
771 | 778 |
| |
|
0 commit comments
Comments
(0)