forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitee28cac
committed
Extend the abilities of libpq's target_session_attrs parameter.
In addition to the existing options of "any" and "read-write", wenow support "read-only", "primary", "standby", and "prefer-standby"."read-write" retains its previous meaning of "transactions areread-write by default", and "read-only" inverts that. The otherthree modes test specifically for hot-standby status, which is notquite the same thing. (Setting default_transaction_read_only ona primary server renders it read-only to this logic, but not astandby.)Furthermore, if talking to a v14 or later server, no extra networkround trip is needed to detect the session's status; the GUC_REPORTvariables delivered by the server are enough. When talking to anolder server, a SHOW or SELECT query is issued to detect sessionread-only-ness or server hot-standby state, as needed.Haribabu Kommi, Greg Nancarrow, Vignesh C, Tom Lane; reviewed atvarious times by Laurenz Albe, Takayuki Tsunakawa, Peter Smith.Discussion:https://postgr.es/m/CAF3+xM+8-ztOkaV9gHiJ3wfgENTq97QcjXQt+rbFQ6F7oNzt9A@mail.gmail.com1 parent57e6db7 commitee28cac
File tree
6 files changed
+456
-114
lines changed- doc/src/sgml
- src
- interfaces/libpq
- test/recovery/t
6 files changed
+456
-114
lines changedLines changed: 68 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1877 | 1877 |
| |
1878 | 1878 |
| |
1879 | 1879 |
| |
1880 |
| - | |
1881 |
| - | |
1882 |
| - | |
1883 |
| - | |
1884 |
| - | |
1885 |
| - | |
1886 |
| - | |
1887 |
| - | |
1888 |
| - | |
1889 |
| - | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
1890 | 1947 |
| |
1891 |
| - | |
| 1948 | + | |
1892 | 1949 |
| |
1893 | 1950 |
| |
1894 | 1951 |
| |
|
0 commit comments
Comments
(0)