Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pg_dropcache is a PostgreSQL extension that invalidates shared_buffers cache

NotificationsYou must be signed in to change notification settings

zilder/pg_dropcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg_dropcache is a PostgreSQL extension that invalidatesshared_buffers cache

Installation

To installpg_dropcache clone this repository and run:

make install USE_PGXS=1

Then in psql (or any other client) execute:

create extension pg_dropcache;

Usage

WARNING: Dirty pages will be just dropped, therefore they won't be flushed on the disk! It should be used with extreme caution!

To clear whole buffer cache run:

select pg_dropcache();

To clear cache buffers for just a single relation:

select pg_drop_rel_cache(<relation>);

If you need to clear a specific buffer cache, you can specify it as second parameter:

select pg_drop_rel_cache(<relation>, <fork>);

fork can have one of the following values:

  • 'main'
  • 'vm'
  • 'fsm'
  • 'init'

Have fun!

About

pg_dropcache is a PostgreSQL extension that invalidates shared_buffers cache

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp