Code Monkey home page Code Monkey logo

cmu-db / postgres Goto Github PK

View Code? Open in Web Editor NEW

This project forked from postgres/postgres

10.0 10.0 102.0 640.69 MB

Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch

Home Page: https://www.postgresql.org/

License: Other

Makefile 0.69% Shell 0.17% C++ 0.06% C 87.57% PLpgSQL 5.72% Perl 2.72% Assembly 0.01% DTrace 0.01% XS 0.01% Python 0.31% Emacs Lisp 0.01% Batchfile 0.02% Yacc 1.32% Lex 0.47% M4 0.40% Ruby 0.39% Roff 0.01% sed 0.01% PLSQL 0.11%

postgres's People

Contributors

adunstan avatar akorotkov avatar alvherre avatar anarazel avatar bmomjian avatar danielgustafsson avatar david-rowley avatar dbdbdb avatar deanrasheed avatar feodor avatar hlinnaka avatar itgacky avatar jconway avatar jeff-davis avatar kgrittn avatar macdice avatar masaofujii avatar mhagander avatar michaelpq avatar nmisch avatar petere avatar petergeoghegan avatar robertmhaas avatar scrappy avatar sfrost avatar simonat2ndquadrant avatar tatsuo-ishii avatar tglsfdc avatar tvondra avatar vadim4o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

postgres's Issues

The replication docker-compose configuration relies on a sleep.

Problem

  1. The replication configuration for docker-compose currently has one primary and one replica.
  2. The replica depends on the primary being ready before running pg_basebackup to bootstrap.
  3. The canonical way to check for whether replication is ready is to call pg_isready.
  4. However, in bringing up the primary, we start-stop-start the DBMS. This exposes the following race:
primary: start
replica: pg_isready OK
primary: stop
replica: pg_basebackup fails

Whereas we hope this happens:

primary: start
primary: stop
primary: start
replica: pg_isready OK
replica: pg_basebackup OK

Hacky solution

Right now, we just sleep in the docker-entrypoint.sh script for 10 seconds. In other words, we hope that

start-stop-start
^^^^^^^^^^
Hopefully less than 10 seconds.

Envisioned solution

We could orchestrate signaling of some kind (wait for a file to be created on the primary, send a network message, etc).

Cache configure for Docker images.

On my machine running the docker-compose images, configure takes around 40s and make install itself is instant in comparison. Caching configure would drop time-from-change-to-psql to ~5s, as opposed to the current one minute.

It would be convenient and ecofriendly to figure out how to properly pass the --cache-file / --config-cache parameter to configure, save that config.status, and reuse it in Docker containers wherever possible.

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.