|
35 | 35 | <primary>pg_buffercache_evict_all</primary>
|
36 | 36 | </indexterm>
|
37 | 37 |
|
| 38 | + <indexterm> |
| 39 | + <primary>pg_buffercache_mark_dirty</primary> |
| 40 | + </indexterm> |
| 41 | + |
| 42 | + <indexterm> |
| 43 | + <primary>pg_buffercache_mark_dirty_all</primary> |
| 44 | + </indexterm> |
| 45 | + |
38 | 46 | <para>
|
39 | 47 | This module provides the <function>pg_buffercache_pages()</function>
|
40 | 48 | function (wrapped in the <structname>pg_buffercache</structname> view),
|
41 | 49 | <function>pg_buffercache_numa_pages()</function> function (wrapped in the
|
42 | 50 | <structname>pg_buffercache_numa</structname> view), the
|
43 | 51 | <function>pg_buffercache_summary()</function> function, the
|
44 | 52 | <function>pg_buffercache_usage_counts()</function> function, the
|
45 |
| - <function>pg_buffercache_evict()</function>, the |
46 |
| - <function>pg_buffercache_evict_relation()</function> function and the |
47 |
| - <function>pg_buffercache_evict_all()</function> function. |
| 53 | + <function>pg_buffercache_evict()</function> function, the |
| 54 | + <function>pg_buffercache_evict_relation()</function> function, the |
| 55 | + <function>pg_buffercache_evict_all()</function> function, the |
| 56 | + <function>pg_buffercache_mark_dirty()</function> function and the |
| 57 | + <function>pg_buffercache_mark_dirty_all()</function> function. |
48 | 58 | </para>
|
49 | 59 |
|
50 | 60 | <para>
|
|
99 | 109 | function is restricted to superusers only.
|
100 | 110 | </para>
|
101 | 111 |
|
| 112 | + <para> |
| 113 | + The <function>pg_buffercache_mark_dirty()</function> function allows a block |
| 114 | + to be marked as dirty from the buffer pool given a buffer identifier. Use of |
| 115 | + this function is restricted to superusers only. |
| 116 | + </para> |
| 117 | + |
| 118 | + <para> |
| 119 | + The <function>pg_buffercache_mark_dirty_all()</function> function tries to |
| 120 | + mark all buffers dirty in the buffer pool. Use of this function is |
| 121 | + restricted to superusers only. |
| 122 | + </para> |
| 123 | + |
102 | 124 | <sect2 id="pgbuffercache-pg-buffercache">
|
103 | 125 | <title>The <structname>pg_buffercache</structname> View</title>
|
104 | 126 |
|
|
522 | 544 | </para>
|
523 | 545 | </sect2>
|
524 | 546 |
|
| 547 | + <sect2 id="pgbuffercache-pg-buffercache-mark-dirty"> |
| 548 | + <title>The <structname>pg_buffercache_mark_dirty</structname> Function</title> |
| 549 | + <para> |
| 550 | + The <function>pg_buffercache_mark_dirty()</function> function takes a |
| 551 | + buffer identifier, as shown in the <structfield>bufferid</structfield> |
| 552 | + column of the <structname>pg_buffercache</structname> view. It returns |
| 553 | + true on success, and false if the buffer wasn't valid or if it couldn't be |
| 554 | + marked as dirty because it was pinned. The result is immediately out of |
| 555 | + date upon return, as the buffer might become valid again at any time due to |
| 556 | + concurrent activity. The function is intended for developer testing only. |
| 557 | + </para> |
| 558 | + </sect2> |
| 559 | + |
| 560 | + <sect2 id="pgbuffercache-pg-buffercache-mark-dirty-all"> |
| 561 | + <title>The <structname>pg_buffercache_mark_dirty_all</structname> Function</title> |
| 562 | + <para> |
| 563 | + The <function>pg_buffercache_mark_dirty_all()</function> function is very |
| 564 | + similar to the <function>pg_buffercache_mark_dirty()</function> function. |
| 565 | + The difference is, the <function>pg_buffercache_mark_dirty_all()</function> |
| 566 | + function does not take an argument; instead it tries to mark all buffers |
| 567 | + dirty in the buffer pool. The result is immediately out of date upon |
| 568 | + return, as the buffer might become valid again at any time due to |
| 569 | + concurrent activity. The function is intended for developer testing only. |
| 570 | + </para> |
| 571 | + </sect2> |
| 572 | + |
525 | 573 | <sect2 id="pgbuffercache-sample-output">
|
526 | 574 | <title>Sample Output</title>
|
527 | 575 |
|
|
0 commit comments