forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit626eca6
committed
This patch reserves the last superuser_reserved_connections slots for
connections by the superuser only.This patch replaces the last patch I sent a couple of days ago.It closes a connection that has not been authorised by a superuser if it wouldleave less than the GUC variable ReservedBackends(superuser_reserved_connections in postgres.conf) backend process slots freein the SISeg. This differs to the first patch which only reserved the lastReservedBackends slots in the procState array. This has made the free slottest more expensive due to the use of a lock.After thinking about a comment on the first patch I've also made it a fatalerror if the number of reserved slots is not less than the maximum number ofconnections.Nigel J. Andrews1 parent1761990 commit626eca6
File tree
9 files changed
+90
-21
lines changed- src
- backend
- postmaster
- storage/ipc
- utils
- init
- misc
- include
- storage
9 files changed
+90
-21
lines changedLines changed: 19 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
154 | 166 |
| |
155 | 167 |
| |
156 | 168 |
| |
| |||
567 | 579 |
| |
568 | 580 |
| |
569 | 581 |
| |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
570 | 588 |
| |
571 | 589 |
| |
572 | 590 |
| |
|
Lines changed: 25 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
538 | 538 |
| |
539 | 539 |
| |
540 | 540 |
| |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + |
Lines changed: 18 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| 63 | + | |
63 | 64 |
| |
64 | 65 |
| |
65 | 66 |
| |
| |||
91 | 92 |
| |
92 | 93 |
| |
93 | 94 |
| |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
94 | 102 |
| |
95 | 103 |
| |
96 | 104 |
| |
| |||
103 | 111 |
| |
104 | 112 |
| |
105 | 113 |
| |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
118 | 117 |
| |
119 | 118 |
| |
120 | 119 |
| |
| |||
123 | 122 |
| |
124 | 123 |
| |
125 | 124 |
| |
| 125 | + | |
| 126 | + | |
| 127 | + | |
126 | 128 |
| |
127 | 129 |
| |
128 | 130 |
| |
| |||
166 | 168 |
| |
167 | 169 |
| |
168 | 170 |
| |
| 171 | + | |
| 172 | + | |
| 173 | + | |
169 | 174 |
| |
170 | 175 |
| |
171 | 176 |
| |
|
Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
398 | 408 |
| |
399 | 409 |
| |
400 | 410 |
| |
|
Lines changed: 9 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| |||
537 | 537 |
| |
538 | 538 |
| |
539 | 539 |
| |
540 |
| - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
541 | 543 |
| |
542 | 544 |
| |
543 | 545 |
| |
544 | 546 |
| |
545 | 547 |
| |
546 | 548 |
| |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
547 | 554 |
| |
548 | 555 |
| |
549 | 556 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
| 182 | + | |
182 | 183 |
| |
183 | 184 |
| |
184 | 185 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
| 92 | + | |
| 93 | + | |
92 | 94 |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
| 88 | + | |
88 | 89 |
| |
89 | 90 |
| |
90 | 91 |
| |
|
0 commit comments
Comments
(0)