forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit54d9e8c
committed
Use "transient" files for blind writes
"Blind writes" are a mechanism to push buffers down to disk whenevicting them; since they may belong to different databases than the onea backend is connected to, the backend does not necessarily have arelation to link them to, and thus no way to blow them away. We werekeeping those files open indefinitely, which would cause a problem ifthe underlying table was deleted, because the operating system would notbe able to reclaim the disk space used by those files.To fix, have bufmgr mark such files as transient to smgr; the lowerlayer is allowed to close the file descriptor when the currenttransaction ends. We must be careful to have any other access of thefile to remove the transient markings, to prevent unnecessary expensivesystem calls when evicting buffers belonging to our own database (whichfiles we're likely to require again soon.)1 parent74b1d29 commit54d9e8c
6 files changed
+119
-28
lines changedLines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1834 | 1834 |
| |
1835 | 1835 |
| |
1836 | 1836 |
| |
1837 |
| - | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
1838 | 1841 |
| |
1839 | 1842 |
| |
1840 | 1843 |
| |
| |||
1856 | 1859 |
| |
1857 | 1860 |
| |
1858 | 1861 |
| |
1859 |
| - | |
| 1862 | + | |
1860 | 1863 |
| |
| 1864 | + | |
1861 | 1865 |
| |
| 1866 | + | |
| 1867 | + | |
1862 | 1868 |
| |
1863 | 1869 |
| |
1864 | 1870 |
| |
|
Lines changed: 82 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
| 128 | + | |
| 129 | + | |
128 | 130 |
| |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
| 131 | + | |
| 132 | + | |
134 | 133 |
| |
135 | 134 |
| |
136 | 135 |
| |
| |||
953 | 952 |
| |
954 | 953 |
| |
955 | 954 |
| |
956 |
| - | |
| 955 | + | |
957 | 956 |
| |
958 | 957 |
| |
959 | 958 |
| |
| |||
1026 | 1025 |
| |
1027 | 1026 |
| |
1028 | 1027 |
| |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1029 | 1067 |
| |
1030 | 1068 |
| |
1031 | 1069 |
| |
| |||
1778 | 1816 |
| |
1779 | 1817 |
| |
1780 | 1818 |
| |
1781 |
| - | |
1782 |
| - | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
1783 | 1822 |
| |
1784 | 1823 |
| |
1785 | 1824 |
| |
| |||
1802 | 1841 |
| |
1803 | 1842 |
| |
1804 | 1843 |
| |
1805 |
| - | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
1806 | 1848 |
| |
1807 | 1849 |
| |
1808 | 1850 |
| |
| |||
1819 | 1861 |
| |
1820 | 1862 |
| |
1821 | 1863 |
| |
1822 |
| - | |
| 1864 | + | |
1823 | 1865 |
| |
1824 | 1866 |
| |
1825 | 1867 |
| |
1826 | 1868 |
| |
1827 | 1869 |
| |
1828 | 1870 |
| |
1829 |
| - | |
| 1871 | + | |
1830 | 1872 |
| |
1831 |
| - | |
1832 |
| - | |
1833 |
| - | |
1834 |
| - | |
1835 |
| - | |
1836 |
| - | |
1837 |
| - | |
1838 |
| - | |
1839 |
| - | |
1840 |
| - | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
1841 | 1893 |
| |
1842 |
| - | |
1843 |
| - | |
1844 |
| - | |
1845 |
| - | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1846 | 1902 |
| |
1847 | 1903 |
| |
1848 | 1904 |
| |
1849 | 1905 |
| |
1850 |
| - | |
| 1906 | + | |
1851 | 1907 |
| |
1852 | 1908 |
| |
1853 | 1909 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
| 291 | + | |
| 292 | + | |
| 293 | + | |
291 | 294 |
| |
292 | 295 |
| |
293 | 296 |
| |
| |||
542 | 545 |
| |
543 | 546 |
| |
544 | 547 |
| |
| 548 | + | |
| 549 | + | |
| 550 | + | |
545 | 551 |
| |
546 | 552 |
| |
547 | 553 |
| |
| |||
1556 | 1562 |
| |
1557 | 1563 |
| |
1558 | 1564 |
| |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
1559 | 1568 |
| |
1560 | 1569 |
| |
1561 | 1570 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
| 168 | + | |
168 | 169 |
| |
169 | 170 |
| |
170 | 171 |
| |
171 | 172 |
| |
172 | 173 |
| |
173 | 174 |
| |
| 175 | + | |
| 176 | + | |
| 177 | + | |
174 | 178 |
| |
175 | 179 |
| |
176 | 180 |
| |
177 | 181 |
| |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
178 | 195 |
| |
179 | 196 |
| |
180 | 197 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| 64 | + | |
64 | 65 |
| |
65 | 66 |
| |
66 | 67 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
| 65 | + | |
65 | 66 |
| |
66 | 67 |
| |
67 | 68 |
| |
| |||
74 | 75 |
| |
75 | 76 |
| |
76 | 77 |
| |
| 78 | + | |
77 | 79 |
| |
78 | 80 |
| |
79 | 81 |
| |
|
0 commit comments
Comments
(0)