forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit84c18ac
committed
Remove redundant snapshot copying from parallel leader to workers
The parallel query infrastructure copies the leader backend's activesnapshot to the worker processes. But BitmapHeapScan node also hadbespoken code to pass the snapshot from leader to the worker. That wasredundant, so remove it.The removed code was analogous to the snapshot serialization intable_parallelscan_initialize(), but that was the wrong role model. Aparallel bitmap heap scan is more like an independent non-parallelbitmap heap scan in each parallel worker as far as the table AM isconcerned, because the coordination is done in nodeBitmapHeapscan.c,and the table AM doesn't need to know anything about it.This relies on the assumption that es_snapshot ==GetActiveSnapshot(). That's not a new assumption, things would getweird if you used the QueryDesc's snapshot for visibility checks inthe scans, but the active snapshot for evaluating quals, forexample. This could use some refactoring and cleanup, but for now,just add some assertions.Reviewed-by: Dilip Kumar, Robert HaasDiscussion:https://www.postgresql.org/message-id/5f3b9d59-0f43-419d-80ca-6d04c07cf61a@iki.fi1 parent2346df6 commit84c18ac
File tree
6 files changed
+15
-34
lines changed- src
- backend
- access/table
- executor
- include
- access
- nodes
6 files changed
+15
-34
lines changedLines changed: 0 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 | 123 |
| |
134 | 124 |
| |
135 | 125 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
| 150 | + | |
| 151 | + | |
| 152 | + | |
150 | 153 |
| |
151 | 154 |
| |
152 | 155 |
| |
| |||
319 | 322 |
| |
320 | 323 |
| |
321 | 324 |
| |
| 325 | + | |
| 326 | + | |
| 327 | + | |
322 | 328 |
| |
323 | 329 |
| |
324 | 330 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
720 | 720 |
| |
721 | 721 |
| |
722 | 722 |
| |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
723 | 730 |
| |
724 | 731 |
| |
725 | 732 |
| |
|
Lines changed: 2 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
721 | 721 |
| |
722 | 722 |
| |
723 | 723 |
| |
724 |
| - | |
725 | 724 |
| |
726 | 725 |
| |
727 | 726 |
| |
| |||
841 | 840 |
| |
842 | 841 |
| |
843 | 842 |
| |
844 |
| - | |
845 |
| - | |
846 |
| - | |
847 |
| - | |
848 |
| - | |
849 |
| - | |
850 |
| - | |
| 843 | + | |
851 | 844 |
| |
852 | 845 |
| |
853 | 846 |
| |
| |||
862 | 855 |
| |
863 | 856 |
| |
864 | 857 |
| |
865 |
| - | |
866 | 858 |
| |
867 | 859 |
| |
868 | 860 |
| |
869 | 861 |
| |
870 | 862 |
| |
871 | 863 |
| |
872 |
| - | |
| 864 | + | |
873 | 865 |
| |
874 | 866 |
| |
875 | 867 |
| |
| |||
881 | 873 |
| |
882 | 874 |
| |
883 | 875 |
| |
884 |
| - | |
885 | 876 |
| |
886 | 877 |
| |
887 | 878 |
| |
| |||
927 | 918 |
| |
928 | 919 |
| |
929 | 920 |
| |
930 |
| - | |
931 | 921 |
| |
932 | 922 |
| |
933 | 923 |
| |
934 | 924 |
| |
935 | 925 |
| |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 | 926 |
|
Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1038 | 1038 |
| |
1039 | 1039 |
| |
1040 | 1040 |
| |
1041 |
| - | |
1042 |
| - | |
1043 |
| - | |
1044 |
| - | |
1045 |
| - | |
1046 | 1041 |
| |
1047 | 1042 |
| |
1048 | 1043 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1689 | 1689 |
| |
1690 | 1690 |
| |
1691 | 1691 |
| |
1692 |
| - | |
1693 | 1692 |
| |
1694 | 1693 |
| |
1695 | 1694 |
| |
| |||
1701 | 1700 |
| |
1702 | 1701 |
| |
1703 | 1702 |
| |
1704 |
| - | |
1705 | 1703 |
| |
1706 | 1704 |
| |
1707 | 1705 |
| |
| |||
1721 | 1719 |
| |
1722 | 1720 |
| |
1723 | 1721 |
| |
1724 |
| - | |
1725 | 1722 |
| |
1726 | 1723 |
| |
1727 | 1724 |
| |
| |||
1745 | 1742 |
| |
1746 | 1743 |
| |
1747 | 1744 |
| |
1748 |
| - | |
1749 | 1745 |
| |
1750 | 1746 |
| |
1751 | 1747 |
| |
|
0 commit comments
Comments
(0)