Giter Club home page Giter Club logo

pg_cheat_funcs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pg_cheat_funcs's Issues

Would you accept a DropDatabaseBuffers() function?

Hi Fujii-san,

I am thinking about writing a pg_cheat_funcs() patch to call the function DropDatabaseBuffers(). I would use something like this for testing my corruption detection tools. I can modify the on-disk representation myself, possibly by using my pg_hexedit tool, and then call a Postgres function to invalidate anything that happens to be in shared_buffers immediately. I can then test some amcheck function, or whatever it happens to be, to make sure it detects the issue. This new function would be a convenience thing for this very specific kind of work.

I was going to just write a PR, but thought I should ask first: If I wrote a function like this, would you accept it? It's not obvious that you would, because calling DropDatabaseBuffers() outside of something like a DROP DATABASE is generally very dangerous. The function drops dirty buffers without cleaning them/writing them out first. I thought about just making the function do a checkpoint first, which would be easy, but quickly realized that that would be even more dangerous: it would lead to a false sense of security, because it would only work 99% of the time. (There'd still be race conditions)

What do you think? If it's not suitable, I can just do something on my own.

Thanks!

test pg_eucjp FAILED

Hi Fujii,

Thanks for making pg_cheat_funcs!

make installcheck fails on Ubuntu 20.04.2 LTS running Ubuntu 13.2-1.pgdg20.04+1.

Maybe I need to run some additional apt-get command to install the EUC_JP encoding before running the tests?

$ cat regression.diffs
diff -U3 /home/joel/postgresql-extensions/pg_cheat_funcs/expected/pg_eucjp.out /home/joel/postgresql-extensions/pg_cheat_funcs/results/pg_eucjp.out
--- /home/joel/postgresql-extensions/pg_cheat_funcs/expected/pg_eucjp.out	2021-04-26 06:55:53.064946839 +0000
+++ /home/joel/postgresql-extensions/pg_cheat_funcs/results/pg_eucjp.out	2021-04-26 07:00:01.184044549 +0000
@@ -1,17974 +1,5 @@
CREATE DATABASE regtest_cheat_funcs_eucjp ENCODING 'EUC_JP' TEMPLATE template0;
+ERROR:  encoding "EUC_JP" does not match locale "en_US.UTF-8"
+DETAIL:  The chosen LC_CTYPE setting requires encoding "UTF8".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.