- Notifications
You must be signed in to change notification settings - Fork5
Commit763eec6
committed
Clean up some minor inefficiencies in parallel dump/restore.
Parallel dump did a totally pointless query to find out the name of eachtable to be dumped, which it already knows. Parallel restore runs issuedlots of redundant SET commands because _doSetFixedOutputState() was invokedonce per TOC item rather than just once at connection start. While theextra queries are insignificant if you're dumping or restoring largetables, it still seems worth getting rid of them.Also, give the responsibility for selecting the right client_encoding fora parallel dump worker to setup_connection() where it naturally belongs,instead of having ad-hoc code for that in CloneArchive(). And fix someminor bugs like use of strdup() where pg_strdup() would be safer.Back-patch to 9.3, mostly to keep the branches in sync in an area thatwe're still finding bugs in.Discussion: <5086.1464793073@sss.pgh.pa.us>1 parent9ee56df commit763eec6
3 files changed
+34
-50
lines changedLines changed: 1 addition & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
802 | 802 |
| |
803 | 803 |
| |
804 | 804 |
| |
805 |
| - | |
806 | 805 |
| |
807 | 806 |
| |
808 | 807 |
| |
| |||
813 | 812 |
| |
814 | 813 |
| |
815 | 814 |
| |
816 |
| - | |
817 |
| - | |
818 |
| - | |
819 |
| - | |
820 |
| - | |
821 |
| - | |
822 |
| - | |
823 |
| - | |
824 |
| - | |
825 |
| - | |
826 |
| - | |
827 |
| - | |
828 |
| - | |
829 |
| - | |
830 |
| - | |
831 |
| - | |
832 |
| - | |
833 |
| - | |
834 |
| - | |
835 |
| - | |
836 |
| - | |
837 |
| - | |
838 |
| - | |
| 815 | + | |
839 | 816 |
| |
840 | 817 |
| |
841 | 818 |
| |
842 |
| - | |
843 | 819 |
| |
844 | 820 |
| |
845 | 821 |
| |
|
Lines changed: 7 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3893 | 3893 |
| |
3894 | 3894 |
| |
3895 | 3895 |
| |
| 3896 | + | |
3896 | 3897 |
| |
3897 | 3898 |
| |
3898 | 3899 |
| |
| |||
4071 | 4072 |
| |
4072 | 4073 |
| |
4073 | 4074 |
| |
4074 |
| - | |
4075 |
| - | |
4076 | 4075 |
| |
4077 | 4076 |
| |
| 4077 | + | |
4078 | 4078 |
| |
4079 | 4079 |
| |
4080 | 4080 |
| |
| |||
4443 | 4443 |
| |
4444 | 4444 |
| |
4445 | 4445 |
| |
| 4446 | + | |
4446 | 4447 |
| |
4447 | 4448 |
| |
4448 | 4449 |
| |
4449 | 4450 |
| |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
4450 | 4454 |
| |
4451 | 4455 |
| |
4452 | 4456 |
| |
4453 | 4457 |
| |
4454 | 4458 |
| |
4455 | 4459 |
| |
4456 | 4460 |
| |
4457 |
| - | |
4458 | 4461 |
| |
4459 | 4462 |
| |
4460 | 4463 |
| |
| |||
4468 | 4471 |
| |
4469 | 4472 |
| |
4470 | 4473 |
| |
4471 |
| - | |
4472 | 4474 |
| |
4473 | 4475 |
| |
4474 | 4476 |
| |
4475 | 4477 |
| |
4476 |
| - | |
4477 |
| - | |
4478 |
| - | |
4479 |
| - | |
4480 |
| - | |
4481 |
| - | |
4482 |
| - | |
| 4478 | + | |
4483 | 4479 |
| |
4484 | 4480 |
| |
4485 | 4481 |
| |
|
Lines changed: 26 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
952 | 952 |
| |
953 | 953 |
| |
954 | 954 |
| |
955 |
| - | |
956 |
| - | |
957 |
| - | |
958 |
| - | |
| 955 | + | |
959 | 956 |
| |
960 | 957 |
| |
961 | 958 |
| |
| |||
973 | 970 |
| |
974 | 971 |
| |
975 | 972 |
| |
976 |
| - | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
977 | 978 |
| |
978 | 979 |
| |
979 | 980 |
| |
| |||
986 | 987 |
| |
987 | 988 |
| |
988 | 989 |
| |
989 |
| - | |
| 990 | + | |
990 | 991 |
| |
991 |
| - | |
| 992 | + | |
992 | 993 |
| |
993 | 994 |
| |
994 | 995 |
| |
| |||
1074 | 1075 |
| |
1075 | 1076 |
| |
1076 | 1077 |
| |
1077 |
| - | |
1078 |
| - | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
1079 | 1081 |
| |
1080 | 1082 |
| |
1081 |
| - | |
| 1083 | + | |
1082 | 1084 |
| |
1083 | 1085 |
| |
1084 | 1086 |
| |
| |||
1104 | 1106 |
| |
1105 | 1107 |
| |
1106 | 1108 |
| |
| 1109 | + | |
1107 | 1110 |
| |
1108 |
| - | |
| 1111 | + | |
1109 | 1112 |
| |
1110 |
| - | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1111 | 1123 |
| |
1112 | 1124 |
| |
1113 | 1125 |
| |
1114 | 1126 |
| |
1115 | 1127 |
| |
1116 |
| - | |
| 1128 | + | |
1117 | 1129 |
| |
1118 | 1130 |
| |
1119 | 1131 |
| |
1120 | 1132 |
| |
1121 |
| - | |
| 1133 | + | |
1122 | 1134 |
| |
1123 | 1135 |
| |
1124 | 1136 |
| |
|
0 commit comments
Comments
(0)