PostgreSQL full cache Patching

Source: Internet
Author: User
This article and its attachments are published in the PostgreSQL Protocol. A friend once asked how to clear the cache. Without this function, it is very inconvenient to test. I made a patch

This article and its attachments are published in the PostgreSQL Protocol. A friend once asked how to clear the cache. Without this function, it is very inconvenient to test. I made a patch

This article and its attachments are published in the PostgreSQL Protocol

A friend once asked how to clear the cache. Without this function, it is very inconvenient to test.

I have made a patch. For more information, see the attachment.

Provide two SQL commands to be compatible with Oracle as much as possible:

1. alter system checkpoint;
This is actually to encapsulate the CHECKPOINT into a new syntax with no changes.
2. alter system flush SHARED_BUFFER/BUFFER_CACHE;
Clear the database cache and fl the modified data to the hard disk. The dirty block write function still calls PG core code.

Description
1. The syntax is parsed by Flex and Bison (Yacc). Please check their documents on your own.
2. The SYSTEM keyword is changed from non-retained to retained.
3. Add the non-reserved keyword FLUSH
4. SHARED_BUFFER and BUFFER_CACHE are not defined as keywords, but compared with strings.
5. GANQI_VERSION is the project name defined by myself. You can delete it or set it to 1 in the compiling environment.
6. After simple tests, I personally cannot guarantee code security. Please do not use it in the production environment.

Download a full cache patch from PostgreSQL:

Free on

Both the user name and password are

The specific download directory is in/July 6,/July 14,/PostgreSQL, where the cache patches are completely refreshed.

For the download method, see

PostgreSQL details: click here
PostgreSQL: click here

PostgreSQL 9.3 materialized view usage

Four tips for using PostgreSQL database date type

PostgreSQL deletes duplicate data rows in a table

PostgreSQL cache details

Compiling PostgreSQL on Windows

Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.