Repair ALTER EXTENSION ... SET SCHEMA.
[pgsql.git] / src / test / modules / test_slru / expected / test_slru.out
blob185c56e5d628bb9cc79e9cb10babd2fac0f3233f
1 CREATE EXTENSION test_slru;
2 SELECT test_slru_page_exists(12345);
3  test_slru_page_exists 
4 -----------------------
5  f
6 (1 row)
8 SELECT test_slru_page_write(12345, 'Test SLRU');
9  test_slru_page_write 
10 ----------------------
12 (1 row)
14 SELECT test_slru_page_read(12345);
15  test_slru_page_read 
16 ---------------------
17  Test SLRU
18 (1 row)
20 SELECT test_slru_page_exists(12345);
21  test_slru_page_exists 
22 -----------------------
23  t
24 (1 row)
26 -- 48 extra pages
27 SELECT count(test_slru_page_write(a, 'Test SLRU'))
28   FROM generate_series(12346, 12393, 1) as a;
29  count 
30 -------
31     48
32 (1 row)
34 -- Reading page in buffer for read and write
35 SELECT test_slru_page_read(12377, true);
36  test_slru_page_read 
37 ---------------------
38  Test SLRU
39 (1 row)
41 -- Reading page in buffer for read-only
42 SELECT test_slru_page_readonly(12377);
43  test_slru_page_readonly 
44 -------------------------
45  Test SLRU
46 (1 row)
48 -- Reading page not in buffer with read-only
49 SELECT test_slru_page_readonly(12346);
50  test_slru_page_readonly 
51 -------------------------
52  Test SLRU
53 (1 row)
55 -- Write all the pages in buffers
56 SELECT test_slru_page_writeall();
57  test_slru_page_writeall 
58 -------------------------
60 (1 row)
62 -- Flush the last page written out.
63 SELECT test_slru_page_sync(12393);
64 NOTICE:  Called SlruSyncFileTag() for segment 387 on path pg_test_slru/000000000000183
65  test_slru_page_sync 
66 ---------------------
68 (1 row)
70 SELECT test_slru_page_exists(12393);
71  test_slru_page_exists 
72 -----------------------
73  t
74 (1 row)
76 -- Segment deletion
77 SELECT test_slru_page_delete(12393);
78 NOTICE:  Called SlruDeleteSegment() for segment 387
79  test_slru_page_delete 
80 -----------------------
82 (1 row)
84 SELECT test_slru_page_exists(12393);
85  test_slru_page_exists 
86 -----------------------
87  f
88 (1 row)
90 -- Page truncation
91 SELECT test_slru_page_exists(12377);
92  test_slru_page_exists 
93 -----------------------
94  t
95 (1 row)
97 SELECT test_slru_page_truncate(12377);
98  test_slru_page_truncate 
99 -------------------------
101 (1 row)
103 SELECT test_slru_page_exists(12377);
104  test_slru_page_exists 
105 -----------------------
107 (1 row)
109 -- Full deletion
110 SELECT test_slru_delete_all();
111 NOTICE:  Calling test_slru_scan_cb()
112  test_slru_delete_all 
113 ----------------------
115 (1 row)
117 SELECT test_slru_page_exists(12345);
118  test_slru_page_exists 
119 -----------------------
121 (1 row)
123 SELECT test_slru_page_exists(12377);
124  test_slru_page_exists 
125 -----------------------
127 (1 row)
129 SELECT test_slru_page_exists(12393);
130  test_slru_page_exists 
131 -----------------------
133 (1 row)
136 -- Test 64-bit pages
138 SELECT test_slru_page_exists(0x1234500000000);
139  test_slru_page_exists 
140 -----------------------
142 (1 row)
144 SELECT test_slru_page_write(0x1234500000000, 'Test SLRU 64-bit');
145  test_slru_page_write 
146 ----------------------
148 (1 row)
150 SELECT test_slru_page_read(0x1234500000000);
151  test_slru_page_read 
152 ---------------------
153  Test SLRU 64-bit
154 (1 row)
156 SELECT test_slru_page_exists(0x1234500000000);
157  test_slru_page_exists 
158 -----------------------
160 (1 row)
162 -- 48 extra pages
163 SELECT count(test_slru_page_write(a, 'Test SLRU 64-bit'))
164   FROM generate_series(0x1234500000001, 0x1234500000030, 1) as a;
165  count 
166 -------
167     48
168 (1 row)
170 -- Reading page in buffer for read and write
171 SELECT test_slru_page_read(0x1234500000020, true);
172  test_slru_page_read 
173 ---------------------
174  Test SLRU 64-bit
175 (1 row)
177 -- Reading page in buffer for read-only
178 SELECT test_slru_page_readonly(0x1234500000020);
179  test_slru_page_readonly 
180 -------------------------
181  Test SLRU 64-bit
182 (1 row)
184 -- Reading page not in buffer with read-only
185 SELECT test_slru_page_readonly(0x1234500000001);
186  test_slru_page_readonly 
187 -------------------------
188  Test SLRU 64-bit
189 (1 row)
191 -- Write all the pages in buffers
192 SELECT test_slru_page_writeall();
193  test_slru_page_writeall 
194 -------------------------
196 (1 row)
198 -- Flush the last page written out.
199 SELECT test_slru_page_sync(0x1234500000030);
200 NOTICE:  Called SlruSyncFileTag() for segment 10007944888321 on path pg_test_slru/000091A28000001
201  test_slru_page_sync 
202 ---------------------
204 (1 row)
206 SELECT test_slru_page_exists(0x1234500000030);
207  test_slru_page_exists 
208 -----------------------
210 (1 row)
212 -- Segment deletion
213 SELECT test_slru_page_delete(0x1234500000030);
214 NOTICE:  Called SlruDeleteSegment() for segment 10007944888321
215  test_slru_page_delete 
216 -----------------------
218 (1 row)
220 SELECT test_slru_page_exists(0x1234500000030);
221  test_slru_page_exists 
222 -----------------------
224 (1 row)
226 -- Page truncation
227 SELECT test_slru_page_exists(0x1234500000020);
228  test_slru_page_exists 
229 -----------------------
231 (1 row)
233 SELECT test_slru_page_truncate(0x1234500000020);
234  test_slru_page_truncate 
235 -------------------------
237 (1 row)
239 SELECT test_slru_page_exists(0x1234500000020);
240  test_slru_page_exists 
241 -----------------------
243 (1 row)
245 -- Full deletion
246 SELECT test_slru_delete_all();
247  test_slru_delete_all 
248 ----------------------
250 (1 row)
252 SELECT test_slru_page_exists(0x1234500000000);
253  test_slru_page_exists 
254 -----------------------
256 (1 row)
258 SELECT test_slru_page_exists(0x1234500000020);
259  test_slru_page_exists 
260 -----------------------
262 (1 row)
264 SELECT test_slru_page_exists(0x1234500000030);
265  test_slru_page_exists 
266 -----------------------
268 (1 row)
270 DROP EXTENSION test_slru;