Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
PostgreSQL Replication, Second Edition

You're reading from   PostgreSQL Replication, Second Edition Leverage the power of PostgreSQL replication to make your databases more robust, secure, scalable, and fast

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781783550609
Length 322 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Hans-Jürgen Schönig Hans-Jürgen Schönig
Author Profile Icon Hans-Jürgen Schönig
Hans-Jürgen Schönig
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

PostgreSQL Replication Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Understanding the Concepts of Replication 2. Understanding the PostgreSQL Transaction Log FREE CHAPTER 3. Understanding Point-in-time Recovery 4. Setting Up Asynchronous Replication 5. Setting Up Synchronous Replication 6. Monitoring Your Setup 7. Understanding Linux High Availability 8. Working with PgBouncer 9. Working with pgpool 10. Configuring Slony 11. Using SkyTools 12. Working with Postgres-XC 13. Scaling with PL/Proxy 14. Scaling with BDR 15. Working with Walbouncer Index

Index

A

  • archive
    • checking / Checking your archive
    • _command, checking / Checking archive_command
    • transaction log archive, monitoring / Monitoring the transaction log archive
  • archive_command
    • %p / Archiving the transaction log
    • %f / Archiving the transaction log
  • asynchronous replication
    • versus synchronous replication / Synchronous versus asynchronous replication
  • Atomicity, Consistency, Isolation, and Durability (ACID)
    • about / A simple INSERT statement
  • availability
    • measuring / Measuring availability
    • about / Durability and availability

B

  • .backup file
    • about / Cleaning up the XLOG on the way
  • bandwidth
    • about / Understanding the limits of physics
  • base backups
    • taking / Taking base backups
    • pg_basebackup, using / Using pg_basebackup
    • creating, traditional methods used / Making use of traditional methods to create base backups
    • tablespace issues / Tablespace issues
    • network bandwidth, observing / Keeping an eye on the network bandwidth
  • base directory
    • about / base – the actual data directory
    • data files, increasing / Growing data files
    • I/O, performing in chunks / Performing I/O in chunks
    • relation forks / Relation forks
  • BDR
    • about / Understanding BDR replication concepts
    • installing / Installing BDR
    • binary packages, installing / Installing binary packages
    • URL / Installing binary packages
  • BDR group
    • creating / Loading modules and firing up the cluster
  • BDR replication
    • about / Understanding BDR replication concepts
    • eventual consistency, defining / Understanding eventual consistency
    • use cases / Use cases for BDR, Good use cases for BDR
    • logical decoding / Logical decoding does the trick

C

  • Call Detail Records (CDRs)
    • about / Scenario 3 – I/O spikes and throughput considerations
  • CAP theorem
    • about / The CAP theorem and physical limitations of replication
    • defining / Understanding the CAP theorem
    • Consistency / Understanding the CAP theorem
    • Availability / Understanding the CAP theorem
    • Partition tolerance / Understanding the CAP theorem
  • cascaded replication
    • configuring / Configuring a cascaded replication
  • changelog triggers
    • about / Dealing with logical replication
  • checkpointing
    • about / Understanding the checkpoints
  • checkpoints
    • tuning / Tuning checkpoints and the XLOG
    • defining / Understanding the checkpoints
    • configuring / Configuring the checkpoints
    • checkpoint_segments, defining / Segments and timeouts
    • checkpoint_timeout, defining / Segments and timeouts
    • data, writing / To write or not to write?
    • stock market data, storing / Scenario 1 – storing stock market data
    • bulk loading / Scenario 2 – bulk loading
    • I/O spikes / Scenario 3 – I/O spikes and throughput considerations
  • checkpoint_timeout parameter
    • about / Segments and timeouts
  • check_postgres
    • URL / Dealing with monitoring tools, Deciding on a monitoring strategy
  • cleanup
    • defining / Efficient cleanup and the end of recovery
  • cluster
    • configuring / Configuring a simple cluster
    • GTM, creating / Creating the GTM
    • setting up / Setting up a simple cluster
    • storage, arranging / Arranging storage
    • database instances, creating / Creating database instances
    • modules, loading / Loading modules and firing up the cluster
    • starting / Loading modules and firing up the cluster
    • setup, checking / Checking your setup
    • conflicts, handling / Handling conflicts
  • clusters
    • extending / Extending and handling clusters in a clever way
    • handling / Extending and handling clusters in a clever way
    • partitions, adding / Adding and moving partitions
    • partitions, moving / Adding and moving partitions
    • availability, increasing / Increasing the availability
    • foreign keys, managing / Managing foreign keys
    • PL/Proxy nodes, upgrading / Upgrading the PL/Proxy nodes
  • commit log
    • about / pg_clog – the commit log
    • states / pg_clog – the commit log
  • common maintenance tasks
    • defining / Common maintenance tasks
    • maintenance, performing single node / Performing maintenance on a single node
    • failover, forcing / Forcing a failover
    • failed PostgreSQL starts, recovering / Recovering from failed PostgreSQL starts
    • cluster-wide maintenance, performing / Performing cluster-wide maintenance
    • resynchronizing, after master failure / Resynchronizing after master failure
  • components, SkyTools
    • pgq / Dissecting SkyTools
    • londiste / Dissecting SkyTools
    • walmgr / Dissecting SkyTools
  • configuration components, walbouncer
    • listen_port / Configuring walbouncer
    • master / Configuring walbouncer
    • configurations / Configuring walbouncer
  • configure command
    • about / Installing SkyTools
  • conflict
    • solving / Conflict management
  • conflict management
    • defining / Conflict management
  • consistency
    • about / Understanding consistency and data loss
  • consistent hashing
    • about / Increasing and decreasing the size of a cluster
    • advantages / Increasing and decreasing the size of a cluster
  • Corosync / Understanding Linux-HA, Corosync
  • corosync-keygen tool
    • about / Corosync
  • createdb tool
    • about / Checking the replication
  • Crmsh
    • about / PCS

D

  • data
    • replicating / Understanding replication and data loss
  • database
    • configuring / PostgreSQL consistency levels
    • replicating / Replicating your first database
  • data distribution
    • using / Using sharding and data distribution
  • data loss
    • defining / Understanding replication and data loss
    • about / Understanding consistency and data loss
  • data node scan
    • about / Creating tables and issuing queries
  • DDLs
    • deploying / Deploying DDLs
    • about / Deploying DDLs
  • delayed replicas
    • defining / Delayed replicas
    • Point-in-time Recovery (PITR) / Delayed replicas
    • asynchronous replication / Delayed replicas
    • crashes, handling / Handling crashes
  • delay_threshold variable
    • about / Optimizing the pgpool configuration for master/slave mode
  • designated controller (DC)
    • about / Verifying the setup
  • DISCARD ALL command / Cleanup issues
  • disk
    • defining / All the way to the disk
    • from memory, to memory / From memory to memory
    • from memory, to disk / From the memory to the disk
    • batteries, defining / A word about batteries
    • fsync function / Beyond the fsync function
  • DISTRIBUTE BY clause
    • about / Dispatching the tables
  • Dow Jones Industrial Average (DJIA)
    • about / Scenario 1 – storing stock market data
  • downtime
    • about / Understanding the purpose of High Availability
  • durability
    • about / Durability and availability

E

  • error scenarios
    • about / Error scenarios
    • network connection, dead / Network connection between the master and slave is dead
    • slave, rebooting / Rebooting the slave
    • master, rebooting / Rebooting the master
    • corrupted XLOG, in archive / Corrupted XLOG in the archive
  • eventual consistency
    • about / Understanding eventual consistency
    • URL / Understanding eventual consistency
    • conflicts, handling / Handling conflicts
    • sequences, distributing / Distributing sequences
    • DDLs, handling / Handling DDLs

F

  • failovers
    • dealing with / Dealing with failovers and High Availability
    • performing / Performing failovers
    • planned failovers / Planned failovers
    • unplanned failovers / Unplanned failovers
    • handling / Handling failovers and dropping nodes
  • failures
    • detecting / Detecting failures
  • fence agents
    • about / Understanding Linux-HA, Resource agents / fence agents
  • fencing
    • about / The split-brain syndrome
  • fields, pg_stat_replication
    • pid / Relevant fields in pg_stat_replication
    • usesysid / Relevant fields in pg_stat_replication
    • usename / Relevant fields in pg_stat_replication
    • application_name / Relevant fields in pg_stat_replication
    • client_addr / Relevant fields in pg_stat_replication
    • client_hostname / Relevant fields in pg_stat_replication
    • client_port / Relevant fields in pg_stat_replication
    • backend_start / Relevant fields in pg_stat_replication
    • backend_xmin / Relevant fields in pg_stat_replication
    • state / Relevant fields in pg_stat_replication
    • sent_location / Relevant fields in pg_stat_replication
    • write_location / Relevant fields in pg_stat_replication
    • flush_location / Relevant fields in pg_stat_replication
    • replay_location / Relevant fields in pg_stat_replication
    • sync_priority / Relevant fields in pg_stat_replication
    • sync_state / Relevant fields in pg_stat_replication
  • filtering rules, walbouncer
    • adjusting / Adjusting filtering rules
    • objects, removing / Removing and filtering objects
    • objects, filtering / Removing and filtering objects
    • objects, adding to slaves / Adding objects to slaves
  • fsync function / Beyond the fsync function

G

  • Generalized Inverted Index (GIN)
    • about / Understanding the XLOG records
  • global directory
    • about / global – the global data
    • standalone data files, defining / Dealing with standalone data files
  • Global Transaction IDs (GXIDs)
    • about / GTM
  • GTM
    • about / GTM
    • creating / Creating the GTM

H

  • HA cluster
    • setting up / Setting up a simple HA cluster
    • servers, preparing / Preparing the servers
    • software, installing / Installing the necessary software
    • clustering software, configuring / Configuring the clustering software
    • PostgreSQL installation, preparing / Preparing for the PostgreSQL installation
    • standby, syncing / Syncing the standby
    • configuring / Configuring the cluster
    • cluster resources, configuring / Configuring cluster resources
    • constraints, configuring / Configuring the constraints
    • fencing, setting up / Setting up fencing
    • setup, verifying / Verifying the setup
  • high availability
    • dealing with / Dealing with failovers and High Availability
  • High Availability (HA)
    • need for / Understanding the purpose of High Availability
    • about / Understanding the purpose of High Availability, Handling node failovers

I

  • INSERT statement
    • about / A simple INSERT statement
    • advantages / A simple INSERT statement
    • crashing, during WAL writing / Crashing during WAL writing
    • crashing, after WAL writing / Crashing after WAL writing

L

  • lag
    • about / Synchronous versus asynchronous replication
  • latency
    • about / Understanding the limits of physics
    • long-distance transmission / Understanding the limits of physics
    • defining / Understanding the limits of physics
  • Linux-HA
    • about / Understanding Linux-HA
    • Corosync / Corosync
    • Pacemaker / Pacemaker
    • resource agents / Resource agents / fence agents
    • fence agents / Resource agents / fence agents
    • PCS / PCS
    • PostgreSQL resource agent (PG RA) / The PostgreSQL resource agent
  • Linux HA
    • using / Using PostgreSQL streaming and Linux HA
  • load balancing
    • setting up / Setting up replication and load balancing
  • Logical Decoding
    • about / When to use logical replication
  • logical decoding
    • about / Logical replication slots
    • advantages / Logical decoding does the trick
  • logical replication
    • versus physical replication / Logical versus physical replication
    • using / When to use logical replication
  • logical replication slots
    • about / Logical replication slots
    • replication identities, configuring / Configuring replication identities
  • Logical Sequence Number (LSN) / LSNs and shared buffer interaction
  • londiste
    • used, for replicating data / Using Londiste to replicate data
    • advantages / Using Londiste to replicate data
    • first table, replicating / Replicating our first table

M

  • master configuration
    • about / The master configuration
  • masters
    • slaves, turning to / Turning slaves into masters
  • max_standby_archive_delay parameter
    • about / Conflict management
  • max_standby_streaming_delay parameter
    • about / Conflict management
  • max_wal_senders parameter / Tweaking the config files on the master
  • modules
    • installing / Installing additional modules
  • monitoring tools
    • dealing with / Dealing with monitoring tools
    • check_postgres, installing / Installing check_postgres
    • monitoring strategy, deciding / Deciding on a monitoring strategy
  • monitor operation
    • about / Configuring cluster resources
  • multi-master replication
    • versus single-master replication / Single-master versus multimaster replication
  • Murphy's law
    • defining / Understanding the purpose of High Availability

N

  • node failovers
    • handling / Handling node failovers
  • node groups
    • about / Dispatching the tables
  • nodes
    • adding / Adding nodes
    • data, rebalancing / Rebalancing data
    • dropping / Handling failovers and dropping nodes
    • replacing / Replacing the nodes
    • GTM standby, running / Running a GTM standby

O

  • one row of data
    • writing / Writing one row of data
    • INSERT statement / A simple INSERT statement
  • Online Transaction Processing (OLTP)
    • about / Creating a GTM proxy
  • Open Cluster Framework (OCF)
    • about / Resource agents / fence agents
  • operating system processes
    • checking for / Checking for operating system processes
  • options, PostgreSQL
    • on / PostgreSQL consistency levels
    • off / PostgreSQL consistency levels
    • local / PostgreSQL consistency levels
    • remote_write / PostgreSQL consistency levels

P

  • Pacemaker / Understanding Linux-HA, Pacemaker
  • PCS
    • about / PCS
  • pcs
    • about / Understanding Linux-HA
  • performance, PgBouncer
    • improving / Improving performance
    • pgbench, using / A simple benchmark
    • maintaining / Maintaining PgBouncer
    • admin interface, configuring / Configuring the admin interface
    • management database, using / Using the management database
    • runtime information, extracting / Extracting runtime information
    • operations, suspending / Suspending and resuming operations
    • operations, resuming / Suspending and resuming operations
  • performance, XLOG
    • about / Understanding consistency and data loss
  • performance implications
    • about / Understanding the practical implications and performance
  • performance optimization
    • defining / Optimizing for performance
    • tables, dispatching / Dispatching the tables
    • joins, optimizing / Optimizing joins
    • optimizing, for warehousing / Optimizing for warehousing
    • GTM proxy, creating / Creating a GTM proxy
  • PgBouncer
    • defining / Understanding the fundamental PgBouncer concepts
    • installing / Installing PgBouncer
    • URL / Installing PgBouncer
    • simple config file, writing / Writing a simple config file and starting PgBouncer up
    • requests, dispatching / Dispatching requests
    • settings / More basic settings
    • pool sizes, handling / Handling pool sizes
    • connecting to / Connecting to PgBouncer
    • Java issues / Java issues
    • pool modes / Pool modes
    • cleanup issues / Cleanup issues
  • PgBouncer setup
    • configuring / Configuring your first PgBouncer setup
  • pgpool
    • installing / Installing pgpool
    • URL / Installing pgpool
    • additional modules, installing / Installing additional modules
    • architecture / Understanding the pgpool architecture
    • password authentication / Password authentication
    • firing up / Firing up pgpool and testing the setup
    • setup, testing / Firing up pgpool and testing the setup
    • hosts, attaching / Attaching hosts
    • running, with streaming replication / Running pgpool with streaming replication
    • sr_check_period / Optimizing the pgpool configuration for master/slave mode
    • sr_check_user / Optimizing the pgpool configuration for master/slave mode
    • sr_check_password / Optimizing the pgpool configuration for master/slave mode
  • pgpool configuration
    • optimizing, for master/slave mode / Optimizing the pgpool configuration for master/slave mode
  • pgpool features
    • defining / Understanding the features of pgpool
    • URL / Understanding the features of pgpool
  • pgpool mechanisms
    • for high availability / pgpool mechanisms for High Availability and failover
    • for failover / pgpool mechanisms for High Availability and failover
  • pgq.get_batch_events command
    • about / Consuming messages
  • pgq queues
    • managing / Managing pgq queues
    • running / Running pgq
    • queues, creating / Creating queues and adding data
    • data, adding / Creating queues and adding data
    • consumers, adding / Adding consumers
    • ticker, configuring / Configuring the ticker
    • messages, consuming / Consuming messages
    • queues, dropping / Dropping queues
    • using / Using pgq for large projects
  • pgsql resource agents
    • semantics / Verifying the setup
  • pg_basebackup
    • using / Using pg_basebackup
    • pg_hba.conf, modifying / Modifying pg_hba.conf
    • master server, signaling / Signaling the master server
    • features / pg_basebackup – basic features
    • syntax / pg_basebackup – basic features
    • backup throttling / Backup throttling
    • self-sufficient backups / pg_basebackup – self-sufficient backups
  • pg_basebackup tool
    • about / Making use of traditional methods to create base backups
  • pg_class table / Removing and filtering objects
  • pg_inherit table / Removing and filtering objects
  • pg_namespace table / Removing and filtering objects
  • pg_stat_replication
    • checking / Checking pg_stat_replication
    • fields, defining / Relevant fields in pg_stat_replication
  • physical replication
    • versus logical replication / Logical versus physical replication
    • using / When to use physical replication
  • physical replication slots / Physical replication slots
  • physics
    • limitations / Understanding the limits of physics
  • PITR
    • need for / Understanding the purpose of PITR
    • features / Understanding the purpose of PITR
    • architecture, defining / Moving to the bigger picture
  • PL/Proxy
    • basic concepts / Understanding the basic concepts
    • about / Dealing with the bigger picture
    • data, partitioning / Partitioning the data
    • setting up / Setting up PL/Proxy
    • installing / Setting up PL/Proxy
    • basic example / A basic example
    • partitioned reads and writes / Partitioned reads and writes
  • planned failovers / Planned failovers
  • pool modes
    • about / Pool modes
    • session mode / Pool modes
    • transaction mode / Pool modes
    • statement mode / Pool modes
  • pool sizes, PgBouncer
    • handling / Handling pool sizes
    • max_client_conn / max_client_conn
    • default_pool_size / default_pool_size
    • min_pool_size / min_pool_size
    • reserve_pool_size / reserve_pool_size
    • pool_size / pool_size
    • authentication / Authentication
  • Postgres-XC
    • installing / Installing Postgres-XC
    • URL / Installing Postgres-XC
  • Postgres-XC architecture
    • defining / Understanding the Postgres-XC architecture
    • data nodes / Data nodes
    • GTM / GTM
    • coordinators / Coordinators
    • GTM proxy / GTM proxy
  • PostgreSQL
    • data, writing / How PostgreSQL writes data
    • disk layout / The PostgreSQL disk layout
    • one row of data, writing / Writing one row of data
    • read consistency / Read consistency
    • format, XLOG / The format of the XLOG
    • consistency levels / PostgreSQL consistency levels
    • fsync parameter / PostgreSQL consistency levels
    • synchronous_commit parameter / PostgreSQL consistency levels
  • PostgreSQL, REPLICA IDENTITY
    • DEFAULT / Configuring replication identities
    • USING INDEX / Configuring replication identities
    • FULL / Configuring replication identities
    • NOTHING / Configuring replication identities
  • postgresql.conf parameter
    • about / Java issues
  • PostgreSQL 9.4
    • commands / The underlying protocol
  • PostgreSQL database system
    • architecture / Read consistency
    • variables / The format of the XLOG
  • PostgreSQL disk layout
    • data directory, defining / Looking into the data directory
    • PG_VERSION file / PG_VERSION – the PostgreSQL version number
    • base directory / base – the actual data directory
    • global directory / global – the global data
    • pg_clog, commit log / pg_clog – the commit log
    • shared memory / pg_dynshmem – shared memory
    • pg_hba.conf file / pg_hba.conf – host-based network configuration
    • pg_ident.conf file / pg_ident.conf – ident authentication
    • pg_logical directory / pg_logical – logical decoding
    • pg_multixact file / pg_multixact – multitransaction status data
    • pg_notify directory / pg_notify – LISTEN/NOTIFY data
    • pg_replslot directory / pg_replslot – replication slots
    • pg_serial directory / pg_serial – information about committed serializable transactions
    • pg_snapshot file / pg_snapshot – exported snapshots
    • pg_stat file / pg_stat – permanent statistics
    • pg_stst_tmp file / pg_stat_tmp – temporary statistics data
    • pg_subtrans directory / pg_subtrans – subtransaction data
    • pg_tblspc directory / pg_tblspc – symbolic links to tablespaces
    • pg_twophase directory / pg_twophase – information about prepared statements
    • pg_xlog log / pg_xlog – the PostgreSQL transaction log (WAL)
    • postgresql.conf file / postgresql.conf – the central PostgreSQL configuration file
  • PostgreSQL resource agent (PG RA) / The PostgreSQL resource agent
  • PostgreSQL streaming
    • using / Using PostgreSQL streaming and Linux HA
  • practical implications
    • about / Understanding the practical implications and performance
  • problems, Slony
    • managing / Adding tables to replication and managing problems

Q

  • queries
    • issuing / Creating tables and issuing queries
  • queue, operations
    • enqueue / Managing pgq queues
    • dequeue / Managing pgq queues
  • quorum
    • about / Synchronous versus asynchronous replication, The split-brain syndrome

R

  • random() function
    • about / Making the XLOG deterministic
  • read consistency
    • about / Read consistency
    • components / Read consistency
    • shared buffer, need for / The purpose of the shared buffer
    • mixed reads and writes / Mixed reads and writes
  • recovery.conf
    • defining / Efficient cleanup and the end of recovery
  • recovery_end_command parameter
    • tweaking / Tweaking the end of your recovery
  • redundancy
    • about / Redundancy and stopping replication
  • RELOAD command / Suspending and resuming operations
  • replication
    • physical limitations / The CAP theorem and physical limitations of replication
    • types / Different types of replication
    • synchronous, versus asynchronous replication / Synchronous versus asynchronous replication
    • defining / Understanding replication and data loss
    • Single-master, versus multi-master replication / Single-master versus multimaster replication
    • logical, versus physical replication / Logical versus physical replication
    • and XLOG / The XLOG and replication
    • about / Modifying pg_hba.conf
    • stopping / Redundancy and stopping replication
    • setting up / Setting up replication and load balancing
    • checking / Checking the replication
    • controlling / Controlling replication
  • replication identities
    • configuring / Configuring replication identities
  • replication slots
    • using / Making use of replication slots
    • physical replication slots / Physical replication slots
    • logical replication slots / Logical replication slots
    • checking for / Checking for replication slots
  • resource agents
    • about / Understanding Linux-HA, Resource agents / fence agents
  • restart points
    • control, gaining over / Gaining control over the restart points
  • Restored Backup
    • about / Moving to the bigger picture
  • restore_command
    • about / Performing a basic recovery
  • round trip
    • about / Understanding the limits of physics

S

  • Segmented Least Recently Used (SLRU)
    • about / pg_serial – information about committed serializable transactions
  • sets
    • defining / Understanding sets
    • unidirectional replication / Unidirectional replication
    • data tables, handling / Handling data tables
  • settings, base backup
    • standby_mode / Handling pg_basebackup and recovery.conf
    • primary_conninfo / Handling pg_basebackup and recovery.conf
  • settings, pgpool
    • --with-openssl / Installing pgpool
    • --enable-table-lock / Installing pgpool
    • --enable-sequence-lock / Installing pgpool
    • --with-memached / Installing pgpool
    • pid_file_name / Setting up replication and load balancing
    • listen_addresses / Setting up replication and load balancing
    • port / Setting up replication and load balancing
    • socket_dir / Setting up replication and load balancing
    • pcp_port / Setting up replication and load balancing
    • pcp_socket_dir / Setting up replication and load balancing
    • backend_hostname0 / Setting up replication and load balancing
    • backend_port0 / Setting up replication and load balancing
    • backend_weight0 / Setting up replication and load balancing
    • backend_data_directory0 / Setting up replication and load balancing
    • backend_flag / Setting up replication and load balancing
    • enable_pool_hba / Setting up replication and load balancing
    • pool_passwd / Setting up replication and load balancing
    • authentication_timeout / Setting up replication and load balancing
    • ssl / Setting up replication and load balancing
    • num_init_children / Setting up replication and load balancing
    • max_pool / Setting up replication and load balancing
    • child_life_time / Setting up replication and load balancing
    • child_max_connections / Setting up replication and load balancing
    • connection_life_time / Setting up replication and load balancing
    • client_idle_limit / Setting up replication and load balancing
    • connection_cache / Setting up replication and load balancing
    • reset_query_list / Setting up replication and load balancing
    • replication_mode / Setting up replication and load balancing
    • replicate_select / Setting up replication and load balancing
    • insert_lock / Setting up replication and load balancing
    • load_balance_mode / Setting up replication and load balancing
    • ignore_leading_white_space / Setting up replication and load balancing
    • white_function_list / Setting up replication and load balancing
    • black_function_list / Setting up replication and load balancing
  • sharding
    • using / Using sharding and data distribution
    • need for / Understanding the purpose of sharding
    • sharded system, designing / Designing a sharded system
    • fields, querying / Querying different fields
    • pros / Pros and cons of sharding
    • and redundancy, selecting between / Choosing between sharding and redundancy
    • cluster size, increasing / Increasing and decreasing the size of a cluster
    • cluster size, decreasing / Increasing and decreasing the size of a cluster
    • and replication, combining / Combining sharding and replication
    • implementing / Various sharding solutions
  • sharding solutions
    • defining / Various sharding solutions
    • PostgreSQL-based sharding / PostgreSQL-based sharding
  • shoot the other node in the head (STONITH)
    • about / The split-brain syndrome
  • single-master replication
    • versus multi-master replication / Single-master versus multimaster replication
  • SkyTools
    • about / Installing SkyTools
    • URL / Installing SkyTools
    • installing / Installing SkyTools
    • dissecting / Dissecting SkyTools
  • slave
    • firing up / The slave configuration
  • slave configuration
    • about / The slave configuration
  • slaves
    • turning, to masters / Turning slaves into masters
  • slon daemon / The slon daemon
  • slonik interface
    • about / Replicating your first database
  • Slony
    • installing / Installing Slony
    • URL / Installing Slony
    • working / Understanding how Slony works
    • logical replication, dealing with / Dealing with logical replication
    • slon daemon / The slon daemon
  • split-brain syndrome
    • defining / The split-brain syndrome
  • start operation
    • about / Configuring cluster resources
  • stop operation
    • about / Configuring cluster resources
  • streaming replication
    • setting up / Setting up streaming replication
    • config files, tweaking on master / Tweaking the config files on the master
    • pg_basebackup, handling / Handling pg_basebackup and recovery.conf
    • recovery.conf, handling / Handling pg_basebackup and recovery.conf
    • slave, making readable / Making the slave readable
    • wal_sender / The underlying protocol
    • wal_receiver / The underlying protocol
    • and file-based recovery, mixing / Mixing streaming-based and file-based recovery
    • making, more robust / Making streaming-only replication more robust
    • wal_keep_segments / Making streaming-only replication more robust
    • physical replication slots / Making streaming-only replication more robust
    • wal_keep_segments, using / Using wal_keep_segments
    • replication slots, utilizing / Utilizing replication slots
    • pgpool, running with / Running pgpool with streaming replication
  • suggestions, synchronous replication
    • longer transactions, using / Understanding the practical implications and performance
    • run stuff concurrently / Understanding the practical implications and performance
  • synchronous, versus asynchronous replication
    • performance issues, considering / Considering performance issues
  • synchronous replication
    • versus asynchronous replication / Synchronous versus asynchronous replication
    • setting up / Synchronous replication setup
    • defining / Understanding the downside to synchronous replication
    • considerations / Understanding the downside to synchronous replication
    • application_name parameter, defining / Understanding the application_name parameter
    • working / Making synchronous replication work
    • checking / Checking the replication
    • performance issues, defining / Understanding performance issues
    • synchronous_commit, setting to on / Setting synchronous_commit to on
    • durability settings, changing on fly / Changing durability settings on the fly
  • synchronous_commit
    • setting, to on / Setting synchronous_commit to on
    • setting, to remote_write / Setting synchronous_commit to remote_write
    • setting, to off / Setting synchronous_commit to off
    • setting, to local / Setting synchronous_commit to local

T

  • tables
    • adding, to replication / Adding tables to replication and managing problems
    • replicating / Replicating our first table
    • t_person / Optimizing joins
    • t_person_payment / Optimizing joins
    • t_postal_code / Optimizing joins
    • creating / Creating tables and issuing queries
  • timelines
    • dealing with / Dealing with timelines
    • about / Dealing with timelines
  • timeout parameter
    • about / Attaching hosts
  • traditional methods
    • used, for creating base backups / Making use of traditional methods to create base backups
  • transaction log
    • about / pg_xlog – the PostgreSQL transaction log (WAL)
    • archiving / Archiving the transaction log
    • replaying / Replaying the transaction log
    • basic recovery, performing / Performing a basic recovery
    • positioning, in XLOG / More sophisticated positioning in the XLOG
    • XLOG, cleaning up / Cleaning up the XLOG on the way
    • XLOG files, switching / Switching the XLOG files
  • transaction mode
    • advantages / Pool modes

U

  • udpu
    • about / Corosync
  • unplanned failovers / Unplanned failovers
  • uptime
    • about / Understanding the purpose of High Availability
  • use cases, for BDR
    • about / Use cases for BDR
    • good use cases / Good use cases for BDR
    • bad use cases / Bad use cases for BDR

W

  • WAL
    • about / A simple INSERT statement
  • walbouncer
    • about / The concepts of walbouncer
    • working / The concepts of walbouncer
    • XLOG, filtering / Filtering XLOG
    • reference / Installing walbouncer
    • installing / Installing walbouncer
    • configuring / Configuring walbouncer
    • base backup, creating / Creating a base backup
    • firing up / Firing up walbouncer
    • additional configuration options / Using additional configuration options
    • filtering rules, adjusting / Adjusting filtering rules
  • WAL buffers
    • tweaking / Tweaking WAL buffers
  • walmgr tool
    • about / A word about walmgr
  • WAL timeline ID
    • benefits / The PostgreSQL resource agent
  • wal_level parameter / Tweaking the config files on the master
  • wal_level settings
    • defining / Archiving the transaction log
  • Write-Ahead Log (WAL)
    • about / pg_xlog – the PostgreSQL transaction log (WAL)

X

  • XLOG
    • about / A simple INSERT statement, The format of the XLOG
    • format / The format of the XLOG
    • headers / The format of the XLOG
    • addresses / The format of the XLOG
    • and replication / The XLOG and replication
    • tuning / Tuning checkpoints and the XLOG
    • defining / Experiencing the XLOG in action
    • records, defining / Understanding the XLOG records
    • handling / Making the XLOG reliable
    • Logical Sequence Number (LSN) / LSNs and shared buffer interaction
    • shared buffer interaction / LSNs and shared buffer interaction
    • debugging / Debugging the XLOG and putting it all together
    • filtering / Filtering XLOG
    • consequences / Filtering XLOG
  • XLOG records
    • defining / Understanding the XLOG records
    • XLOG, making deterministic / Making the XLOG deterministic
    • XLOG, making reliable / Making the XLOG reliable
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images