forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbf22792
committed
Fix pg_rewind with in-place tablespaces when source is remote
libpq_source.c would consider any result returned bypg_tablespace_location() as a symlink, resulting in run-time errors likethat:pg_rewind: error: file "pg_tblspc/NN" is of different type in source and targetIn-place tablespaces are directories located in pg_tblspc/, returned asrelative paths instead of absolute paths, so rely on that to make thedifference with a normal tablespace and an in-place one. If the path isrelative, the tablespace is handled as a directory. If the path isabsolute, consider it as a symlink.In-place tablespaces are only intended for development purposes, so like363e8f9 no backpatch is done. A test is added in pg_rewind with anin-place tablespace and some data in it.Author: Rui Zhao, Michael PaquierDiscussion:https://postgr.es/m/2b79d2a8-b2d5-4bd7-a15b-31e485100980.xiyuan.zr@alibaba-inc.com1 parentb68e356 commitbf22792
3 files changed
+31
-1
lines changedLines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
301 |
| - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
302 | 311 |
| |
303 | 312 |
| |
304 | 313 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 |
| |
22 | 28 |
| |
23 | 29 |
| |
| |||
78 | 84 |
| |
79 | 85 |
| |
80 | 86 |
| |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
81 | 94 |
| |
82 | 95 |
| |
83 | 96 |
| |
| |||
145 | 158 |
| |
146 | 159 |
| |
147 | 160 |
| |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
148 | 168 |
| |
149 | 169 |
| |
150 | 170 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| 134 | + | |
134 | 135 |
| |
135 | 136 |
| |
136 | 137 |
| |
|
0 commit comments
Comments
(0)