- Notifications
You must be signed in to change notification settings - Fork5
Commitc0b0076
committed
Rearrange snapshot handling to make rule expansion more consistent.
With this patch, portals, SQL functions, and SPI all agree that thereshould be only a CommandCounterIncrement between the queries that aregenerated from a single SQL command by rule expansion. Fetching a wholenew snapshot now happens only between original queries. This is equivalentto the existing behavior of EXPLAIN ANALYZE, and it was judged to be thebest choice since it eliminates one source of concurrency hazards forrules. The patch should also make things marginally faster by reducing thenumber of snapshot push/pop operations.The patch removes pg_parse_and_rewrite(), which is no longer used anywhere.There was considerable discussion about more aggressive refactoring of thequery-processing functions exported by postgres.c, but for the momentnothing more has been done there.I also took the opportunity to refactor snapmgr.c's API slightly: theformer PushUpdatedSnapshot() has been split into two functions.Marko Tiikkaja, reviewed by Steve Singer and Tom Lane1 parent57e9bda commitc0b0076
File tree
10 files changed
+389
-217
lines changed- src
- backend
- catalog
- commands
- executor
- tcop
- utils/time
- include
- tcop
- utils
10 files changed
+389
-217
lines changedLines changed: 22 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
764 | 764 |
| |
765 | 765 |
| |
766 | 766 |
| |
| 767 | + | |
767 | 768 |
| |
| 769 | + | |
768 | 770 |
| |
769 | 771 |
| |
770 | 772 |
| |
| |||
835 | 837 |
| |
836 | 838 |
| |
837 | 839 |
| |
| 840 | + | |
| 841 | + | |
838 | 842 |
| |
839 | 843 |
| |
840 |
| - | |
841 |
| - | |
842 |
| - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
843 | 862 |
| |
844 | 863 |
| |
845 | 864 |
| |
846 | 865 |
| |
847 |
| - | |
848 |
| - | |
849 | 866 |
| |
850 | 867 |
| |
851 | 868 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1216 | 1216 |
| |
1217 | 1217 |
| |
1218 | 1218 |
| |
1219 |
| - | |
| 1219 | + | |
| 1220 | + | |
1220 | 1221 |
| |
1221 | 1222 |
| |
1222 | 1223 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
366 | 366 |
| |
367 | 367 |
| |
368 | 368 |
| |
369 |
| - | |
| 369 | + | |
| 370 | + | |
370 | 371 |
| |
371 | 372 |
| |
372 | 373 |
| |
|
0 commit comments
Comments
(0)