Denish Patel gave a presentation on PostgreSQL replication. He began by introducing himself and his background. He then discussed PostgreSQL write-ahead logging (WAL), replication history, and how replication is currently setup. The presentation covered replication slots, demoing replication without external tools using pg_basebackup, streaming replication with slots, and pg_receivexlog. Patel also discussed monitoring replication and answered questions from the audience.
Out of the box replication in postgres 9.4Denish Patel
This document provides an overview of setting up out of the box replication in PostgreSQL 9.4 without third party tools. It discusses write-ahead logs (WAL), replication slots, pg_basebackup, and pg_receivexlog. The document then demonstrates setting up replication on VMs with pg_basebackup to initialize a standby server, configuration of primary and standby servers, and monitoring of replication.
The document provides configuration instructions and guidelines for setting up streaming replication between a PostgreSQL master and standby server, including setting parameter values for wal_level, max_wal_senders, wal_keep_segments, creating a dedicated replication role, using pg_basebackup to initialize the standby, and various recovery target options to control the standby's behavior. It also discusses synchronous replication using replication slots and monitoring the replication process on both the master and standby servers.
Out of the box replication in postgres 9.4(pg confus)Denish Patel
This document contains notes from a presentation on PostgreSQL replication. It discusses write-ahead logs (WAL), replication history in PostgreSQL from versions 7.0 to 9.4, how to set up basic replication, tools for backups and monitoring replication, and demonstrates setting up replication without third party tools using pg_basebackup, replication slots, and pg_receivexlog. It also includes contact information for the presenter and an invitation to join the PostgreSQL Slack channel.
This document discusses streaming replication in PostgreSQL. It covers how streaming replication works, including the write-ahead log and replication processes. It also discusses setting up replication between a primary and standby server, including configuring the servers and verifying replication is working properly. Monitoring replication is discussed along with views and functions for checking replication status. Maintenance tasks like adding or removing standbys and pausing replication are also mentioned.
This document discusses advanced Postgres monitoring. It begins with an introduction of the speaker and an agenda for the discussion. It then covers selection criteria for monitoring solutions, compares open source and SAAS monitoring options, and provides examples of collecting specific Postgres metrics using CollectD. It also discusses alerting, handling monitoring changes, and being prepared to respond to incidents outside of normal hours.
This document provides instructions for setting up hot standby replication between a primary and secondary PostgreSQL database. It describes configuring WAL archiving on the primary, taking a backup of the primary to initialize the secondary, creating a recovery.conf file on the secondary, and testing replication. It also explains how to trigger a failover, switchover, and rebuild the primary database after a failover.
PostgreSQL High Availability in a Containerized WorldJignesh Shah
This document discusses PostgreSQL high availability in a containerized environment. It begins with an overview of containers and their advantages like lower footprint and density. It then covers enterprise needs for high availability like recovery time objectives. Common approaches to PostgreSQL high availability are discussed like replication, shared storage, and using projects like Patroni and Stolon. Modern trends with containers are highlighted like separating data and binaries. Kubernetes is presented as a production-grade orchestrator that can provide horizontal scaling and self-healing capabilities. The discussion concludes with challenges of multi-region deployments and how service discovery with Consul can help address those challenges.
1. A PostgreSQL database outage occurred at GitLab on January 31st due to a combination of factors including an increase in load, replication lag, and the deletion of the database directory.
2. Lessons learned include monitoring replication, using tools like pg_basebackup properly, and having backups and disaster recovery processes in place.
3. Recommended preventative measures include setting sane configuration values, automated testing of backups, assigning an owner for data durability, and improving documentation.
Out of the box replication in postgres 9.4Denish Patel
This document provides an overview of setting up out of the box replication in PostgreSQL 9.4 without third party tools. It discusses write-ahead logs (WAL), replication slots, pg_basebackup, and pg_receivexlog. The document then demonstrates setting up replication on VMs with pg_basebackup to initialize a standby server, configuration of primary and standby servers, and monitoring of replication.
The document provides configuration instructions and guidelines for setting up streaming replication between a PostgreSQL master and standby server, including setting parameter values for wal_level, max_wal_senders, wal_keep_segments, creating a dedicated replication role, using pg_basebackup to initialize the standby, and various recovery target options to control the standby's behavior. It also discusses synchronous replication using replication slots and monitoring the replication process on both the master and standby servers.
Out of the box replication in postgres 9.4(pg confus)Denish Patel
This document contains notes from a presentation on PostgreSQL replication. It discusses write-ahead logs (WAL), replication history in PostgreSQL from versions 7.0 to 9.4, how to set up basic replication, tools for backups and monitoring replication, and demonstrates setting up replication without third party tools using pg_basebackup, replication slots, and pg_receivexlog. It also includes contact information for the presenter and an invitation to join the PostgreSQL Slack channel.
This document discusses streaming replication in PostgreSQL. It covers how streaming replication works, including the write-ahead log and replication processes. It also discusses setting up replication between a primary and standby server, including configuring the servers and verifying replication is working properly. Monitoring replication is discussed along with views and functions for checking replication status. Maintenance tasks like adding or removing standbys and pausing replication are also mentioned.
This document discusses advanced Postgres monitoring. It begins with an introduction of the speaker and an agenda for the discussion. It then covers selection criteria for monitoring solutions, compares open source and SAAS monitoring options, and provides examples of collecting specific Postgres metrics using CollectD. It also discusses alerting, handling monitoring changes, and being prepared to respond to incidents outside of normal hours.
This document provides instructions for setting up hot standby replication between a primary and secondary PostgreSQL database. It describes configuring WAL archiving on the primary, taking a backup of the primary to initialize the secondary, creating a recovery.conf file on the secondary, and testing replication. It also explains how to trigger a failover, switchover, and rebuild the primary database after a failover.
PostgreSQL High Availability in a Containerized WorldJignesh Shah
This document discusses PostgreSQL high availability in a containerized environment. It begins with an overview of containers and their advantages like lower footprint and density. It then covers enterprise needs for high availability like recovery time objectives. Common approaches to PostgreSQL high availability are discussed like replication, shared storage, and using projects like Patroni and Stolon. Modern trends with containers are highlighted like separating data and binaries. Kubernetes is presented as a production-grade orchestrator that can provide horizontal scaling and self-healing capabilities. The discussion concludes with challenges of multi-region deployments and how service discovery with Consul can help address those challenges.
1. A PostgreSQL database outage occurred at GitLab on January 31st due to a combination of factors including an increase in load, replication lag, and the deletion of the database directory.
2. Lessons learned include monitoring replication, using tools like pg_basebackup properly, and having backups and disaster recovery processes in place.
3. Recommended preventative measures include setting sane configuration values, automated testing of backups, assigning an owner for data durability, and improving documentation.
This document provides a summary of a presentation on becoming an accidental PostgreSQL database administrator (DBA). It covers topics like installation, configuration, connections, backups, monitoring, slow queries, and getting help. The presentation aims to help those suddenly tasked with DBA responsibilities to not panic and provides practical advice on managing a PostgreSQL database.
There are many ways to run high availability with PostgreSQL. Here, we present a template for you to create your own customized, high-availability solution using Python and for maximum accessibility, a distributed configuration store like ZooKeeper or etcd.
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Command Prompt., Inc
Alex Alexander & Linas Virbalas
Hot standby and streaming replication will move the needle forward for high availability and scaling for a wide number of applications. Tungsten already supports clustering using warm standby. In this talk we will describe how to build clusters using the new PostgreSQL features and give our report from the trenches.
This talk will cover how hot standby and streaming replication work from a user perspective, then dive into a description of how to use them, taking Tungsten as an example. We'll cover the following issues:
* Configuration of warm standby and streaming replication
* Provisioning new standby instances
* Strategies for balancing reads across primary and standby database
* Managing failover
* Troubleshooting and gotchas
Please join us for an enlightening discussion a set of PostgreSQL features that are interesting to a wide range of PostgreSQL users.
This presentation covers all aspects of PostgreSQL administration, including installation, security, file structure, configuration, reporting, backup, daily maintenance, monitoring activity, disk space computations, and disaster recovery. It shows how to control host connectivity, configure the server, find the query being run by each session, and find the disk space used by each database.
PostgreSQL is designed to be easily extensible. For this reason, extensions loaded into the database can function just like features that are built in. In this session, we will learn more about PostgreSQL extension framework, how are they built, look at some popular extensions, management of these extensions in your deployments.
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)Wei Shan Ang
The document discusses alternatives to Pacemaker/Corosync for managing high availability PostgreSQL clusters. It introduces pg_bouncer for connection pooling, Linux's UCARP for virtual IP failover, and 2ndQuadrant's repmgr for managing replication and automatic failover. It notes the challenges with Pacemaker/Corosync and provides an agenda that includes an introduction, challenges with Pacemaker/Corosync, discussing pg_bouncer, UCARP, repmgr, and a demo. Logs from Pacemaker/Corosync are also included showing failed operations and failover.
Percona Toolkit for Effective MySQL AdministrationMydbops
The document discusses various tools from the Percona Toolkit that can be used for effective MySQL administration. It describes tools like pt-config-diff to find configuration differences, pt-query-digest to analyze MySQL queries from logs, pt-duplicate-key-checker to check for duplicate indexes, and pt-table-checksum to perform replication consistency checks. Installation instructions and usage examples are provided for some of the key tools.
In 40 minutes the audience will learn a variety of ways to make postgresql database suddenly go out of memory on a box with half a terabyte of RAM.
Developer's and DBA's best practices for preventing this will also be discussed, as well as a bit of Postgres and Linux memory management internals.
This document summarizes the results of benchmarking PostgreSQL database performance on several cloud platforms, including AWS EC2, RDS, Google Compute Engine, DigitalOcean, Rackspace, and Heroku.
The benchmarks tested small and large instance sizes across the clouds on different workload types, including in-memory and disk-based transactions and queries. Key metrics measured were transactions per second (TPS), load time to set up the database, and cost per TPS and load bandwidth.
The results show large performance and cost variations between clouds and instance types. In general, dedicated instances like EC2 outperformed shared instances, and DBaaS options like RDS were more expensive but offered higher availability. The document discusses challenges
This document discusses logical replication with pglogical. It begins by explaining that pglogical performs row-oriented replication and outputs replication data that can be used in various ways. It then covers the architectures of standalone PostgreSQL, physical replication, and logical replication. The rest of the document discusses key aspects of pglogical such as its output plugin, selective replication capabilities, performance and future plans, and examples of using the output with other applications.
Introduction to Stacki at Atlanta Meetup February 2016StackIQ
An introduction to Stacki-the fastest bare metal Linux server provisioning tool from the Stacki Atlanta kickoff meetup on 2/23/16 at the Microsoft Innovation Center. Greg Bruno is the VP Engineering at StackIQ.
The paperback version is available on lulu.com there http://goo.gl/fraa8o
This is the first volume of the postgresql database administration book. The book covers the steps for installing, configuring and administering a PostgreSQL 9.3 on Linux debian. The book covers the logical and physical aspect of PostgreSQL. Two chapters are dedicated to the backup/restore topic.
Postgres-BDR with Google Cloud PlatformSungJae Yun
This document provides an overview of testing PostgreSQL-BDR with Google Cloud Platform. Key points:
- Google Cloud Platform was chosen as the test environment for its regions in Asia, Europe, and US. Nine virtual machines were created, with two in each region configured for PostgreSQL-BDR and one for performance testing.
- PostgreSQL-BDR was installed on the servers and a cluster was created by joining nodes in Asia, US, and Europe. Pgbench tests were run to measure performance of transactions on the replicated database.
- Pgbench results showed transaction rates increased from around 1000 TPS for a single client/server to over 6000 TPS when distributed across the BDR cluster nodes
Out of the Box Replication in Postgres 9.4(PgCon)Denish Patel
This document provides an overview of setting up out of the box replication in PostgreSQL 9.4 without third party tools. It discusses write-ahead logs (WAL), replication slots, pg_basebackup, pg_receivexlog and monitoring replication. The presenter then demonstrates setting up replication on VMs with pg_basebackup to initialize a standby, configuration of primary and standby servers, and monitoring replication status.
Out of the Box Replication in Postgres 9.4(PgCon)Denish Patel
The document provides an overview of out-of-the-box replication in PostgreSQL 9.4. It discusses PostgreSQL write-ahead logging (WAL), setting up basic streaming replication between a primary and standby server, taking base backups with pg_basebackup, and using replication slots and pg_receivexlog to archive WAL files without external tools. The presentation includes steps to set up a demo of this replication method on a virtual machine.
Out of the Box Replication in Postgres 9.4(PgConfUS)Denish Patel
This document contains notes from a presentation on PostgreSQL replication. It discusses write-ahead logs (WAL), replication history in PostgreSQL from versions 7.0 to 9.4, how to set up basic replication, tools for backups and monitoring replication, and demonstrates setting up replication without third party tools using pg_basebackup, replication slots, and pg_receivexlog. Contact information is provided for the presenter and information on their employer, Medallia, is included at the end.
Joshua D. Drake
Are you tired of not having a real solution for PITR? Enter PITRTools, a single and secure solution for using Point In Time Recovery for PostgreSQL.
Docker provides containerization capabilities while Ansible provides automation and configuration capabilities. Together they are useful DevOps tools. Docker allows building and sharing application environments while Ansible automates configuration and deployment. Key points covered include Docker concepts like images and containers, building images with Dockerfiles, and using Docker Compose to run multi-container apps. Ansible is described as a remote execution and configuration tool using YAML playbooks and roles to deploy applications. Their complementary nature makes them good DevOps partners.
This document provides a summary of a presentation on becoming an accidental PostgreSQL database administrator (DBA). It covers topics like installation, configuration, connections, backups, monitoring, slow queries, and getting help. The presentation aims to help those suddenly tasked with DBA responsibilities to not panic and provides practical advice on managing a PostgreSQL database.
There are many ways to run high availability with PostgreSQL. Here, we present a template for you to create your own customized, high-availability solution using Python and for maximum accessibility, a distributed configuration store like ZooKeeper or etcd.
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Command Prompt., Inc
Alex Alexander & Linas Virbalas
Hot standby and streaming replication will move the needle forward for high availability and scaling for a wide number of applications. Tungsten already supports clustering using warm standby. In this talk we will describe how to build clusters using the new PostgreSQL features and give our report from the trenches.
This talk will cover how hot standby and streaming replication work from a user perspective, then dive into a description of how to use them, taking Tungsten as an example. We'll cover the following issues:
* Configuration of warm standby and streaming replication
* Provisioning new standby instances
* Strategies for balancing reads across primary and standby database
* Managing failover
* Troubleshooting and gotchas
Please join us for an enlightening discussion a set of PostgreSQL features that are interesting to a wide range of PostgreSQL users.
This presentation covers all aspects of PostgreSQL administration, including installation, security, file structure, configuration, reporting, backup, daily maintenance, monitoring activity, disk space computations, and disaster recovery. It shows how to control host connectivity, configure the server, find the query being run by each session, and find the disk space used by each database.
PostgreSQL is designed to be easily extensible. For this reason, extensions loaded into the database can function just like features that are built in. In this session, we will learn more about PostgreSQL extension framework, how are they built, look at some popular extensions, management of these extensions in your deployments.
pgDay Asia 2016 - Swapping Pacemaker-Corosync for repmgr (1)Wei Shan Ang
The document discusses alternatives to Pacemaker/Corosync for managing high availability PostgreSQL clusters. It introduces pg_bouncer for connection pooling, Linux's UCARP for virtual IP failover, and 2ndQuadrant's repmgr for managing replication and automatic failover. It notes the challenges with Pacemaker/Corosync and provides an agenda that includes an introduction, challenges with Pacemaker/Corosync, discussing pg_bouncer, UCARP, repmgr, and a demo. Logs from Pacemaker/Corosync are also included showing failed operations and failover.
Percona Toolkit for Effective MySQL AdministrationMydbops
The document discusses various tools from the Percona Toolkit that can be used for effective MySQL administration. It describes tools like pt-config-diff to find configuration differences, pt-query-digest to analyze MySQL queries from logs, pt-duplicate-key-checker to check for duplicate indexes, and pt-table-checksum to perform replication consistency checks. Installation instructions and usage examples are provided for some of the key tools.
In 40 minutes the audience will learn a variety of ways to make postgresql database suddenly go out of memory on a box with half a terabyte of RAM.
Developer's and DBA's best practices for preventing this will also be discussed, as well as a bit of Postgres and Linux memory management internals.
This document summarizes the results of benchmarking PostgreSQL database performance on several cloud platforms, including AWS EC2, RDS, Google Compute Engine, DigitalOcean, Rackspace, and Heroku.
The benchmarks tested small and large instance sizes across the clouds on different workload types, including in-memory and disk-based transactions and queries. Key metrics measured were transactions per second (TPS), load time to set up the database, and cost per TPS and load bandwidth.
The results show large performance and cost variations between clouds and instance types. In general, dedicated instances like EC2 outperformed shared instances, and DBaaS options like RDS were more expensive but offered higher availability. The document discusses challenges
This document discusses logical replication with pglogical. It begins by explaining that pglogical performs row-oriented replication and outputs replication data that can be used in various ways. It then covers the architectures of standalone PostgreSQL, physical replication, and logical replication. The rest of the document discusses key aspects of pglogical such as its output plugin, selective replication capabilities, performance and future plans, and examples of using the output with other applications.
Introduction to Stacki at Atlanta Meetup February 2016StackIQ
An introduction to Stacki-the fastest bare metal Linux server provisioning tool from the Stacki Atlanta kickoff meetup on 2/23/16 at the Microsoft Innovation Center. Greg Bruno is the VP Engineering at StackIQ.
The paperback version is available on lulu.com there http://goo.gl/fraa8o
This is the first volume of the postgresql database administration book. The book covers the steps for installing, configuring and administering a PostgreSQL 9.3 on Linux debian. The book covers the logical and physical aspect of PostgreSQL. Two chapters are dedicated to the backup/restore topic.
Postgres-BDR with Google Cloud PlatformSungJae Yun
This document provides an overview of testing PostgreSQL-BDR with Google Cloud Platform. Key points:
- Google Cloud Platform was chosen as the test environment for its regions in Asia, Europe, and US. Nine virtual machines were created, with two in each region configured for PostgreSQL-BDR and one for performance testing.
- PostgreSQL-BDR was installed on the servers and a cluster was created by joining nodes in Asia, US, and Europe. Pgbench tests were run to measure performance of transactions on the replicated database.
- Pgbench results showed transaction rates increased from around 1000 TPS for a single client/server to over 6000 TPS when distributed across the BDR cluster nodes
Out of the Box Replication in Postgres 9.4(PgCon)Denish Patel
This document provides an overview of setting up out of the box replication in PostgreSQL 9.4 without third party tools. It discusses write-ahead logs (WAL), replication slots, pg_basebackup, pg_receivexlog and monitoring replication. The presenter then demonstrates setting up replication on VMs with pg_basebackup to initialize a standby, configuration of primary and standby servers, and monitoring replication status.
Out of the Box Replication in Postgres 9.4(PgCon)Denish Patel
The document provides an overview of out-of-the-box replication in PostgreSQL 9.4. It discusses PostgreSQL write-ahead logging (WAL), setting up basic streaming replication between a primary and standby server, taking base backups with pg_basebackup, and using replication slots and pg_receivexlog to archive WAL files without external tools. The presentation includes steps to set up a demo of this replication method on a virtual machine.
Out of the Box Replication in Postgres 9.4(PgConfUS)Denish Patel
This document contains notes from a presentation on PostgreSQL replication. It discusses write-ahead logs (WAL), replication history in PostgreSQL from versions 7.0 to 9.4, how to set up basic replication, tools for backups and monitoring replication, and demonstrates setting up replication without third party tools using pg_basebackup, replication slots, and pg_receivexlog. Contact information is provided for the presenter and information on their employer, Medallia, is included at the end.
Joshua D. Drake
Are you tired of not having a real solution for PITR? Enter PITRTools, a single and secure solution for using Point In Time Recovery for PostgreSQL.
Docker provides containerization capabilities while Ansible provides automation and configuration capabilities. Together they are useful DevOps tools. Docker allows building and sharing application environments while Ansible automates configuration and deployment. Key points covered include Docker concepts like images and containers, building images with Dockerfiles, and using Docker Compose to run multi-container apps. Ansible is described as a remote execution and configuration tool using YAML playbooks and roles to deploy applications. Their complementary nature makes them good DevOps partners.
This document provides an overview of PITR (Point-in-Time Recovery) and introduces PITRTools, an open source tool that simplifies implementing PITR for PostgreSQL databases. PITRTools acts as a wrapper around common utilities like rsync, ssh, and pg_standby to enable features like warm standbys, backups, failover, and monitoring alerts. It works by pushing transaction log files from a master database to a slave, and includes configuration files and scripts to initialize, start, and manage the master archiver and slave standby processes.
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam
Ever heard of Point-in-time recovery? pgBackRest is an awsome tool to handle backups, restores and even helps you build streaming replication ! This talk will introduce the tool, its basic features and how to use it.
2012 coscup - Build your PHP application on Herokuronnywang_tw
The document discusses deploying PHP applications on Heroku. It provides an overview of Heroku, including that it is a Platform-as-a-Service, was launched in 2007, uses Amazon Web Services, offers many add-ons, allows easy scaling, supports PostgreSQL, and offers some free usage. It then walks through deploying a basic "Hello World" PHP app on Heroku, including creating an app, adding code, committing and pushing to Heroku, and viewing the deployed app.
This document provides solutions to common Linux commands and tasks. It covers topics such as environment setting, hardware and system specifications, file editing and compression, networking, performance monitoring, package management with RPM, and multimedia. Solutions are provided for tasks like changing the startup runlevel, monitoring swap size, editing files, getting the network IP and registering the hostname, and burning discs.
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...NETWAYS
The simpler the backup, the higher is the chance that the backups will be done by users. So let’s look for simple backup methods.
Two known command-line backup tools of this kind are rdiff-backup and rsnapshot. Both tools allow easy-to-setup backups, and impress with a direct file-level access to the last backup copy.
Although the two tools share the same main idea – “incremental forever backups” – they differ in how they reach this goal. While rdiff-backup stores old versions of a file by only saving the changes (increments) compared to the following version, rsnapshot creates a new backup file whenever a file has changed since the last backup. This fact leads to different advantages and disadvantages: while rdiff-backup is very space-efficient, a restore of an older version of a file might take longer. Rsnapshot on the other hand allows fast restores even for older versions, but as a downside it needs more backup space to store the same amount of data.
So which tool should I use? rdiff-backup or rsnapshot? Well, it depends…
In this talk we will explain how rdiff-backup and rsnapshot work in detail, and show different use-cases. Along with that knowledge, you will find the right answer for you which tool to choose.
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Puppet
This document summarizes Tyler Croy's presentation on managing the Jenkins infrastructure using Puppet. It describes how the infrastructure evolved from an unmanaged setup at Sun/Oracle to using masterless Puppet and eventually Puppet Enterprise. Key aspects covered include managing services, hardware, code layout, testing, and deployment process. Special thanks are given to Puppet Labs for their support of the project.
9 steps to install and configure postgre sql from source on linuxchinkshady
The document outlines 9 steps to install and configure PostgreSQL from source on Linux:
1. Download the PostgreSQL source code
2. Install PostgreSQL by running configure, make, and make install commands
3. The configure command allows specifying various options like installation location, enabling/disabling features
4. After installation, PostgreSQL is configured and ready to use
Chef - industrialize and automate your infrastructureMichaël Lopez
This document compares configuration management tools Puppet, Ansible, and Chef. It discusses their approaches, languages, stored data formats, use of agents, and provides examples of configuration in each. Chef uses Ruby and JSON files, supports hierarchical execution and searching, and can run with or without a server. Puppet uses Ruby, YAML files and dependency-based configuration. Ansible is agentless and uses YAML files and Python plugins.
This document provides an overview of PostgreSQL and instructions for installing and configuring it. It discusses using the initdb command to initialize a PostgreSQL database cluster and create the template1 and postgres databases. It also explains that the template1 database serves as a template that is copied whenever new databases are created.
This document provides an overview and introduction to PostgreSQL for new users. It covers getting started with PostgreSQL, including installing it, configuring authentication and logging, upgrading to new versions, routine maintenance tasks, hardware recommendations, availability and scalability options, and query tuning and optimization. The document is presented as a slide deck with different sections labeled by letters (e.g. K-0, S-0, U-0).
The document provides guidelines for deploying an L.N.M.P environment on a 64-bit server. It specifies directory locations for source code, installed software, scripts and logs. It also outlines steps to update the system, install and configure MySQL, Nginx, PHP and other packages, including compiling Nginx with specific modules and options, setting Nginx as a service, and enabling syntax highlighting for Nginx configuration files.
This document discusses Docker and provides an introduction and overview. It introduces Docker concepts like Dockerfiles, commands, linking containers, volumes, port mapping and registries. It also discusses tools that can be used with Docker like Fig, Baseimage, Boot2Docker and Flynn. The document provides examples of Dockerfiles, commands and how to build, run, link and manage containers.
This document demonstrates pgpool-II for replication and high availability of PostgreSQL databases. It shows:
1. A basic configuration with a master and standby node replicating over pgpool-II for online recovery and load balancing.
2. How pgpool-II can be configured for warm standby replication with automatic failover through scripting.
3. That pgpool-II allows scaling out additional database nodes without downtime and prevents single points of failure through multi-master replication across multiple pgpool instances.
Walter gives an introduction to compiling PHP from source. Some key points covered include:
- Reasons for compiling PHP yourself include supporting old PHP versions, testing multiple versions, and using proprietary extensions.
- The build process involves running ./configure, make, and make install commands. Various configuration options can be specified.
- Popular PHP extensions like APC, Xdebug, PostgreSQL can be installed via PECL. Extensions are also compiled from source using phpize and make.
- The compiled PHP is typically installed to /usr/local/ and configurations made in the php.ini file.
Have you ever dreamed to have an "MKSYSB like" solution to quickly backup/restore your Linux on Power ?
If the answer is YES, the opensource solution named Relax and Recover (ReaR) may be for you.
Come to this session to learn more about how to implement and the capabilities of this solution through presentation and live demonstration.
Similar to Out of the Box Replication in Postgres 9.4(pgconfsf) (20)
This document discusses using PostgreSQL with Amazon RDS. It begins with an introduction to Amazon RDS and then discusses setting up a PostgreSQL RDS instance, available features like backups and monitoring, limitations, pricing, and references for further reading. The document is intended to provide an overview of deploying and managing PostgreSQL on Amazon RDS.
The document discusses top 10 factors to consider when choosing a database: 1) Credibility - assess reputation through independent reviews. 2) Proximity - consider location of available resources. 3) Affordability - evaluate total cost of ownership over time. 4) Maturity - review case studies and customer base. 5) Customer service - assess quality of product documentation and community support.
The document discusses scaling Postgres databases. It covers vertical and horizontal scaling techniques. Vertical scaling involves upgrading hardware resources like CPU, RAM and storage, while horizontal scaling involves adding multiple servers. The document provides tips for optimizing Postgres configuration, monitoring performance, and tuning queries.
Denish Patel deployed PostgreSQL on Amazon EC2 for a startup that had its entire IT architecture on the Amazon cloud. The initial deployment involved setting up master-slave configurations across two EC2 environments with issues like weekly instance failures and lack of monitoring. Patel then consolidated the environments, configured high availability using replication across availability zones and regions, implemented automation using Puppet, and added monitoring and backups to improve the stability and management of the PostgreSQL deployment.
The document discusses the challenges of big data including volume, velocity, variety, and veracity. It proposes using PostgreSQL and Hadoop together as a solution, with PostgreSQL serving as a multi-model database server that can handle structured, semi-structured, and unstructured data in relational, object-relational, nested-relational, array, key-value, document, and range formats. Hadoop is described as a distributed file structure that can perform ETL to convert unstructured to structured data for analytics, easily handle unstructured data like logs and streaming data, and enable parallel processing via MapReduce at the petabyte scale. The takeaway is that together, PostgreSQL and Hadoop can solve "most" big
Deploying Maximum HA Architecture With PostgreSQLDenish Patel
This document proposes a "Maximum HA architecture" for PostgreSQL that aims to provide 99.99% application uptime and reduce mean time to recovery (MTTR) for both planned and unplanned outages. It discusses using techniques like streaming replication, failover, hot backups, log shipping, PITR, and pg_reorg to achieve high availability and minimize downtime from system failures, data failures, planned maintenance, and data growth.
Deploying Maximum HA Architecture With PostgreSQLDenish Patel
This document proposes a "Maximum HA architecture" for PostgreSQL that aims to provide 99.99% application uptime and reduce mean time to recovery (MTTR) for planned and unplanned outages. It discusses using PostgreSQL features like streaming replication, failover, hot backups, WAL archiving and point-in-time recovery (PITR) to achieve high availability, prevent data loss from failures, and allow fast recovery from outages through redundancy and automation. The architecture builds upon traditional high availability techniques and aims to handle different types of failures including system failures, site failures, data failures, and planned changes through comprehensive disaster recovery planning.
This document provides information about database bloat and performance tuning. It introduces Denish Patel, a database architect with expertise in heterogeneous databases including PostgreSQL, Oracle and MySQL. The document discusses what causes database bloat, issues it can create, and tools for identifying, measuring and removing bloat. These include vacuum, vacuum full, cluster, pg_bloat_report, check_postgres_bloat, compact_table and pg_reorg. Monitoring and prevention techniques are also covered.
The document discusses achieving PCI compliance when using PostgreSQL for databases. It provides an overview of PCI requirements, how they apply to databases, and how PostgreSQL features like encryption, access control, and logging can help fulfill the requirements. Specific examples are given for how to implement encryption of cardholder data, restrict access according to the principle of least privilege, and maintain regularly updated software in PostgreSQL.
1) Oracle 10g introduces flashback query which allows users to query past states of data within a specified time period by accessing the undo logs.
2) Flashback table allows users to recover accidentally dropped tables from the recycle bin.
3) Rollback monitoring provides estimated time to complete long running transactions such as rollbacks.
Denish Patel, a database architect at OmniTi, gave a presentation on the RubyRep database replication tool. RubyRep is an asynchronous master-master and master-slave replication tool that is easy to install, platform independent, and supports large objects and tables without primary keys. It was developed as an alternative to Slony because Slony has limitations such as requiring tables to have primary keys and not supporting large objects or master-master replication. The presentation covered how to install, configure, scan, sync, and replicate databases using RubyRep.
3. ! What is WAL?
! Postgres Replication History
! How you setup replication now?
! What’s missing ?
! Why replication slots?
! Demo
I’m NOT going to discuss …
! SLONY or other 3rd party replication tools
! 3rd party replication management tools
2
4. ! Roll-forward recovery aka REDO
! flushed to disk to guarantee commit durability
! sequential writes
! lower cost than flushing page cache
! Allows us to do cool things
! Crash recovery
! Binary backups
! Point-In Time Recovery
! Replication
3
5. ! Automatically enabled; no action required
! Make sure to have enough space on server
! Stored under pg_xlog directory
! Normally, 16MB in size
" --with-wal-segsize config option at build
! Each segment is divided into pages (8 kB page)
" --with-wal-blocksize config option at build
◦ Segment name starts with..
000000010000000000000000
4
6. select * from pg_settings where name='wal_level';
name | wal_level
setting | hot_standby
unit |
category | Write-Ahead Log / Settings
short_desc | Set the level of information written to the WAL.
extra_desc |
context | postmaster
vartype | enum
source | configuration file
min_val |
max_val |
enumvals | { minimal, archive, hot_standby, logical }
boot_val | minimal
reset_val | hot_standby
sourcefile | /var/lib/pgsql/9.4/data/postgresql.auto.conf
sourceline | 4
5
7. Almost everything is replicated, but...
! unlogged tables (As name suggests)
! temporary tables
! hash indexes? (generally don’t use?)
6
33. Are you ready to setup replication without any external
tools?
1. pg_basebackup
2. streaming with Replication Slots
3. pg_receivexlog
32
34. ! Google Drive:
! Login: pgtraining/pgcon
! pgtraining user has sudo access
! You can access terminal on the desktop
! Internet should be working within VM
! Copy/paste should work between VM and Host
! Take snapshot along the process so you can rollback
easily
33
35. ! Remove Postgres 8.4 version
sudo yum erase postgresql.*
! Setup yum repo for your desired version
sudo yum install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/
pgdg-redhat94-9.4-1.noarch.rpm
! Install PostgreSQL 9.4 & Contrib modules
sudo yum install postgresql94-server postgresql94-contrib
! Create postgres cluster & initial automatic startup
sudo service postgresql-9.4 initdb
sudo chkconfig postgresql-9.4 on
sudo service postgresql-9.4 start
34
36. ! Become postgres system user
sudo su - postgres
! Log into database using psql (? to see all available commands)
! Create a role & database for yourself
CREATE ROLE pgtraining WITH LOGIN SUPERUSER;
CREATE DATABASE pgtraining;
! You can login as pgtraining user (psql –U pgtraining –d pgtraining)
! Create replication role for later
CREATE ROLE replication WITH LOGIN REPLICATION;
! Set password (”replication”)
password replication
35
37. ! http://www.postgresql.org/docs/9.4/static/auth-pg-hba-
conf.html
! Find location of hba_file
postgres=# show hba_file;
! Add following entry for replication user
! Try to avoid trust authentication
! [pgtraining@localhost ~]$ sudo vi /var/lib/pgsql/9.4/data/
pg_hba.conf
host replication replication 127.0.0.1/32 md5
36
38. alter system set wal_level = hot_standby;
alter system set archive_mode=on;
alter system set max_replication_slots=8;
alter system set archive_timeout = 60;
alter system set max_wal_senders = 8;
alter system set wal_keep_segments=100;
alter system set logging_collector=on;
37
39. ! Restart database
sudo service postgresql-9.4 restart
! Verify settings
psql=# show max_wal_senders;
38
40. SELECT * FROM pg_create_physical_replication_slot('standby1');
39
45. pgtraining=# select * from pg_replication_slots;
-[ RECORD 1 ]+-----------
slot_name | standby1
plugin |
slot_type | physical
datoid |
database |
active | t
xmin |
catalog_xmin |
restart_lsn | 0/270000EC
44
46. ! Create slot for archiving:
SELECT * FROM
pg_create_physical_replication_slot('archiver1');
! Create archive directory
mkdir /var/lib/pgsql/9.4/archive
! Start archiving process in background
/usr/pgsql-9.4/bin/pg_receivexlog -h 127.0.0.1 -p 5432 -U
replication –S 'archiver1' -n -v -D /var/lib/pgsql/9.4/archive
! Put under init.d for continuous run
! Switch xlog : primary_db_sever# select pg_switch_xlog();
45
47. ! Monitor Disk space
! Monitor slave lag
select pg_xlog_location_diff(sent_location, write_location) AS
byte_lag
from pg_stat_replication
where application_name='pg_receivexlog';
! Monitor WAL archive process
select pg_xlog_location_diff(sent_location, write_location) AS
byte_lag
from pg_stat_replication
where application_name='walreceiver';
46
48. ! Number of pg_xlogs on master
! Monitor pg_recievexlog process
! Make sure archive location has new files
! pg_basebackup log files for successful backup… look
for “pg_basebackup: base backup completed”
47
49. ! OmniTI for travel sponsorships
! Pgcon conference committee
! Peter Eisentraut
! You!!
48