forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf6f0db4
committed
Fix pg_tablespace_location() with in-place tablespaces
Using this system function with an in-place tablespace (created whenallow_in_place_tablespaces is enabled by specifying an empty string aslocation) caused a failure when using readlink(), as the tablespace is,in this case, not a symbolic link in pg_tblspc/ but a directory.Rather than getting a failure, the commit changespg_tablespace_location() so as a relative path to the data directory isreturned for in-place tablespaces, to make a difference betweentablespaces created when allow_in_place_tablespaces is enabled or not.Getting a path rather than an empty string that would match the CREATETABLESPACE command in this case is more useful for tests that would liketo rely on this function.While on it, a regression test is added for this case. This is simpleto add in the main regression test suite thanks to regexp_replace() tomask the part of the tablespace location dependent on its OID.Author: Michael PaquierReviewed-by: Kyotaro Horiguchi, Thomas MunroDiscussion:https://postgr.es/m/YiG1RleON1WBcLnX@paquier.xyz1 parentc91f71b commitf6f0db4
File tree
4 files changed
+49
-1
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+49
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23924 | 23924 | | |
23925 | 23925 | | |
23926 | 23926 | | |
23927 | | - | |
| 23927 | + | |
| 23928 | + | |
| 23929 | + | |
| 23930 | + | |
| 23931 | + | |
| 23932 | + | |
| 23933 | + | |
23928 | 23934 | | |
23929 | 23935 | | |
23930 | 23936 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
| |||
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
309 | 338 | | |
310 | 339 | | |
311 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
0 commit comments
Comments
(0)