forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitae65f60
committed
Provide for forward compatibility with future minor protocol versions.
Previously, any attempt to request a 3.x protocol version other than3.0 would lead to a hard connection failure, which made the minorprotocol version really no different from the major protocol versionand precluded gentle protocol version breaks. Instead, when theclient requests a 3.x protocol version where x is greater than 0, sendthe new NegotiateProtocolVersion message to convey that we supportonly 3.0. This makes it possible to introduce new minor protocolversions without requiring a connection retry when the server isolder.In addition, if the startup packet includes name/value pairs wherethe name starts with "_pq_.", assume that those are protocol options,not GUCs. Include those we don't support (i.e. all of them, atpresent) in the NegotiateProtocolVersion message so that the clientknows they were not understood. This makes it possible for theclient to request previously-unsupported features without bumpingthe protocol version at all; the client can tell from the server'sresponse whether the option was understood.It will take some time before servers that support these newfacilities become common in the wild; to speed things up and makethings easier for a future 3.1 protocol version, back-patch to allsupported releases.Robert Haas and Badrul ChowdhuryDiscussion:http://postgr.es/m/BN6PR21MB0772FFA0CBD298B76017744CD1730@BN6PR21MB0772.namprd21.prod.outlook.comDiscussion:http://postgr.es/m/30788.1498672033@sss.pgh.pa.us1 parentf3b0897 commitae65f60
File tree
2 files changed
+159
-16
lines changed- doc/src/sgml
- src/backend/postmaster
2 files changed
+159
-16
lines changedLines changed: 106 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 |
| |
30 | 38 |
| |
31 | 39 |
| |
| |||
406 | 414 |
| |
407 | 415 |
| |
408 | 416 |
| |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
409 | 432 |
| |
410 | 433 |
| |
411 | 434 |
| |
| |||
420 | 443 |
| |
421 | 444 |
| |
422 | 445 |
| |
423 |
| - | |
424 |
| - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
425 | 450 |
| |
426 | 451 |
| |
427 | 452 |
| |
| |||
4715 | 4740 |
| |
4716 | 4741 |
| |
4717 | 4742 |
| |
| 4743 | + | |
| 4744 | + | |
| 4745 | + | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
| 4775 | + | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
| 4785 | + | |
| 4786 | + | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
| 4810 | + | |
4718 | 4811 |
| |
4719 | 4812 |
| |
4720 | 4813 |
| |
| |||
5670 | 5763 |
| |
5671 | 5764 |
| |
5672 | 5765 |
| |
5673 |
| - | |
5674 |
| - | |
5675 |
| - | |
5676 |
| - | |
5677 |
| - | |
| 5766 | + | |
| 5767 | + | |
| 5768 | + | |
| 5769 | + | |
| 5770 | + | |
| 5771 | + | |
| 5772 | + | |
5678 | 5773 |
| |
5679 | 5774 |
| |
5680 | 5775 |
| |
|
Lines changed: 53 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
| 104 | + | |
104 | 105 |
| |
105 | 106 |
| |
106 | 107 |
| |
| |||
412 | 413 |
| |
413 | 414 |
| |
414 | 415 |
| |
| 416 | + | |
415 | 417 |
| |
416 | 418 |
| |
417 | 419 |
| |
| |||
2052 | 2054 |
| |
2053 | 2055 |
| |
2054 | 2056 |
| |
2055 |
| - | |
2056 |
| - | |
| 2057 | + | |
2057 | 2058 |
| |
2058 |
| - | |
2059 |
| - | |
2060 |
| - | |
| 2059 | + | |
2061 | 2060 |
| |
2062 | 2061 |
| |
2063 | 2062 |
| |
| |||
2079 | 2078 |
| |
2080 | 2079 |
| |
2081 | 2080 |
| |
| 2081 | + | |
2082 | 2082 |
| |
2083 | 2083 |
| |
2084 | 2084 |
| |
| |||
2128 | 2128 |
| |
2129 | 2129 |
| |
2130 | 2130 |
| |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
2131 | 2141 |
| |
2132 | 2142 |
| |
2133 | 2143 |
| |
| |||
2147 | 2157 |
| |
2148 | 2158 |
| |
2149 | 2159 |
| |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
2150 | 2170 |
| |
2151 | 2171 |
| |
2152 | 2172 |
| |
| |||
2260 | 2280 |
| |
2261 | 2281 |
| |
2262 | 2282 |
| |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
| 2290 | + | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
2263 | 2311 |
| |
2264 | 2312 |
| |
2265 | 2313 |
| |
|
0 commit comments
Comments
(0)