Commit c0aed69
committed
Allow UNLISTEN in hot-standby mode.
Since LISTEN is (still) disallowed, UNLISTEN must be a no-op in a
hot-standby session, and so there's no harm in allowing it. This
change allows client code to not worry about whether it's connected
to a primary or standby server when performing session-state-reset
type activities. (Note that DISCARD ALL, which includes UNLISTEN,
was already allowed, making it inconsistent to reject UNLISTEN.)
Per discussion, back-patch to all supported versions.
Shay Rojansky, reviewed by Mi Tar
Discussion: https://postgr.es/m/CADT4RqCf2gA_TJtPAjnGzkC3ZiexfBZiLmA-mV66e4UyuVv8bA@mail.gmail.com1 parent 28868f7 commit c0aed69
File tree
6 files changed
+16
-10
lines changed- doc/src/sgml
- src
- backend/tcop
- test/regress
- expected
- sql
6 files changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1774 | 1774 | | |
1775 | 1775 | | |
1776 | 1776 | | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
1777 | 1782 | | |
1778 | 1783 | | |
1779 | 1784 | | |
| |||
1863 | 1868 | | |
1864 | 1869 | | |
1865 | 1870 | | |
1866 | | - | |
| 1871 | + | |
1867 | 1872 | | |
1868 | 1873 | | |
1869 | 1874 | | |
1870 | 1875 | | |
1871 | 1876 | | |
1872 | 1877 | | |
1873 | 1878 | | |
1874 | | - | |
1875 | | - | |
| 1879 | + | |
| 1880 | + | |
1876 | 1881 | | |
1877 | 1882 | | |
1878 | 1883 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
| 632 | + | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 121 | | |
126 | 122 | | |
127 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
| |||
0 commit comments