The GUCS: A Three-Hour Tour. What are GUCS? # “Grand Unified Configuration Settings” – A large set of global and session database settings which live.

Slides:



Advertisements
Similar presentations
new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
Advertisements

Lesson 17: Configuring Security Policies
Database Optimization & Maintenance Tim Richard ECM Training Conference#dbwestECM Agenda SQL Configuration OnBase DB Planning Backups Integrity.
Copyright © 2003 Americas’ SAP Users’ Group Custom Archiving 101 Session Code 108 Karin Tillotson Sr. Basis Administrator Tuesday, May 20 th, 2003.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
OpenSource GIS 2004 Ottawa, Canada Introduction to PostGIS PostGIS Basics for the New User Paul Ramsey & Chris Hodgson Refractions.
Hands-On Microsoft Windows Server 2003 Chapter 2 Installing Windows Server 2003, Standard Edition.
Hands-On Microsoft Windows Server 2003 Administration Chapter 6 Managing Printers, Publishing, Auditing, and Desk Resources.
Module 2: Planning to Install SQL Server. Overview Hardware Installation Considerations SQL Server 2000 Editions Software Installation Considerations.
ILLiad Migration & Server Upgrade: From Your Library's' IT Point of View Juan Denzer Library System Specialist August 1, 2013.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Russ Houberg Senior Technical Architect, MCM KnowledgeLake, Inc.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
What does SQL Server Management Studio mean? Cortex User Group Meeting Portland – 2012 What does SQL Server Management Studio mean? Cortex User Group Meeting.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
1 Introduction to PostgreSQL. 2 Documents PostgreSQL 8 for Windows (*) Beginning Databases with PostgreSQL From Novice to Professional, Second Edition.
Exam QUESTION CertKiller.com has hired you as a database administrator for their network. Your duties include administering the SQL Server 2008.
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
ITN Wake Tech1 ITN270 Advanced Internet Databases Lecture 14. Introduction to MySQL Administration and the MySQL Data Directory Topics: –Overview.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Administering your PostgreSQL Geodatabase
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Forensic Audit Logging for PostgreSQL
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 11: Monitoring Server Performance.
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
Peter Keller Computer Sciences Department University of Wisconsin-Madison Quill Tutorial Condor Week.
By Lecturer / Aisha Dawood 1.  Dedicated and Shared Server Processes  Configuring Oracle Database for Shared Server  Oracle Database Background Processes.
Administering Your PostgreSQL Geodatabase
Introduction to CS520/CS596_026 Lecture Two Gordon Tian Fall 2015.
A Brief Documentation.  Provides basic information about connection, server, and client.
 Database Administration Installing Oracle 11g & Creating Database.
1 Chapter Overview Planning to Install SQL Server 2000 Deciding SQL Server 2000 Setup Configuration Options Running the SQL Server 2000 Setup Program Using.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
STEP BY STEP INSTALLATION By Eng. BASSEM ALSAID. Step 1: Boot from windows server 2008 installation DVD, windows will load needed files for starting installation.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
GP 2015 Client Event. Management Reporter As of 5/1/2015 the most recent version of MR is 2012 Cumulative Update 12. Mainstream Support for FRx 6.7 ended.
Alibaba and PostgreSQL Guangzhou Zhang Practices on providing PG as a cloud service in Alibaba.
Let’s get into PostgreSQL performance PGDay India 26 February 2016 Himanchali
19 Copyright © 2004, Oracle. All rights reserved. Database Backups.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
Postgres Administration for Sysadmins Spencer Christensen Backcountry.com PostgreSQL Conference East, Philadelphia March 26, 2010.
The GUCS: A Three-Hour Tour. What are GUCS? # “Grand Unified Configuration Settings” – A large set of global and session database settings which live.
SQL Database Management
ETL Validator Deployment Options
Answer to Summary Questions
SmartCenter for Pointsec - MI
Building a functional GIS in Imperial Beach with limited resources
Get to know SQL Manager SQL Server administration done right 
Introduction to Microsoft Access
Creating an Oracle Database
SQL Server Monitoring Overview
Deploying and Configuring SSIS Packages
CS1222 Using Relational Databases and SQL
Managing Multi-user Databases
Principles of report writing
Provisioning and Automating High Availability Postgres on AWS EC2
CS1222 Using Relational Databases and SQL
TEMPDB – INTERNALS AND USAGE
Chapter 11 Managing Databases with SQL Server 2000
Enterprise Geodatabase Administration – Tips and Tricks
Introduction to MS ACCESS
Windows Operating System
Presentation transcript:

The GUCS: A Three-Hour Tour

What are GUCS? # “Grand Unified Configuration Settings” – A large set of global and session database settings which live in: src/backend/utils/misc/guc.c # Your main way of configuring and tuning the database. – in addition to compile options, system configuration and schema tuning! # Pronounced “gucks”

194 Switches and Levers

194 Settings?!?

Don't worry!

Setting GUCS

Eight types of GUCS # Boolean # Integer # Float # Memory / Disk # Time # Strings # ENUMs # Lists

Eight types of GUCS # Boolean – take TRUE | FALSE or ON | OFF enable_seqscan = on # Integer – take whole numbers only max_connections = 700

Eight types of GUCS # Float – take decimal values random_page_cost = 3.75 # Memory / Disk Size – can take integers – but can also take “computer units”: kB, MB, GB work_mem = 512MB shared_buffers = 4096

Eight Types of GUCS # Time – take time values (units vary) – units are often omitted authentication_timeout = 30s # Strings – take unchecked strings – often refers to file locations or program names log_directory = 'pg_log'

Eight Types of GUCS # ENUMs – take a string value from a prescribed list log_destination = 'csvlog' # Lists – take a list of values, either freeform or ENUM search_path = 'main, archive, “$user”'

Six GUCS Contexts # user # superuser # sighup # postmaster # backend # internal

Six GUCS Contexts # user – can be set on per-session basis at runtime # superuser – can be set at runtime for the whole server, but only by the superuser # sighup – requires a soft restart of the postmaster to change # postmaster – can only be changed with a hard restart

Six GUCS Contexts # backend – developer settings which have to be set before session start # internal – compile-time settings provided for reference. Unalterable.

5 Places of set GUCs 1.postgresql.conf file 2.SET 3.pg_settings 4.ALTER objects 5.command-line switches & PGOPTIONS

postgresql.conf # $PGDATA/postgresql.conf – can be relocated or symlinked # Primary way to change GUCS – for performance – for logging – for defaults

postgresql.conf # just a big list of settings # defaults are “# commented” out # if a setting appears multiple times, the last one takes effect

SET & SHOW # Access GUCS in a SQL session – SET changes ● only applies to user and superuser contexts ● best way to change things for only one session ● can be embedded in stored procedures SET enable_mergejoin = false; – SHOW displays ● SHOW ALL lets you see all GUCS SHOW shared_buffers;

pg_settings # Tabular representation of GUCS – a “system view” – can be queried – can be updated, which runs a SET on the relevant parameter – needs some clean-up (I'm working on it) select * from pg_settings where name = 'work_mem'; update pg_settings set setting = '12MB' where name = 'work_mem';

ALTER objects # You can ALTER some objects to change their configuration settings – ROLES (users) – DATABASEs – FUNCTIONs – Changes configuration setting when that object is used (unless overridden by a SET) ALTER ROLE “data entry” SET search_path = 'entry, public';

ALTER objects # Good way to discriminate between applications & users – set search_path ● sometimes for security – primitive resource management ● change work_mem, etc. for specific ROLES, applications or reports – localization ● if different users have different desired displays ALTER DATABASE sao_paulo SET timezone = 'America/SaoPaulo';

command-line and pgoptions # Set options when you start PostgreSQL – as command-line switches – using the PGOPTIONS shell variable # Not generally recommended – hard to administrate or document – mainly for running automated tests ● and for restarting with recovery options postgres -c 'bgwriter_delay = 50ms' export PGOPTIONS = '-c zero_damaged_pages = ON'

GUCS Reference

The 14 Settings most users need to adjust (1)listen_address (2)max_connections (3)shared_buffers (4)work_mem (5)maintenance_ work_mem (6)max_fsm_pages (7)synchronous_commit (8)checkpoint_segments (9)wal_buffers (10)autovacuum (11)effective_cache_size (12)default_statistics_target (13)constraint_exclusion (14)log_destination & log settings

Categories (new) # file locations # connection settings # memory management # maintenance # WAL & checkpoints # query tuning # logging # statistics # locks # locale & formatting # other settings & defaults # compatibility # custom GUCS # developer options # presets

GUCS: the Grand Tour

Finale # Josh Berkus: – blog: blogs.ittoolbox.com/database/soup # PostgreSQL: – Sun: # Upcoming Events – PGDay OSCON : July 20th, Portland – PGDay LWE : August 5, San Francisco – PGCon Brazil : September 27-28, Campinas This talk is copyright 2007 Josh Berkus, and is licensed under the creative commons attribution license