Postgresql Server Programming Second Edition Table of Contents

Total Page:16

File Type:pdf, Size:1020Kb

Postgresql Server Programming Second Edition Table of Contents PostgreSQL Server Programming Second Edition Table of Contents PostgreSQL Server Programming Second Edition Credits About the Authors About the Reviewers www.PacktPub.com Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions 1. What Is a PostgreSQL Server? Why program in the server? Using PL/pgSQL for integrity checks About this book’s code examples Switching to the expanded display Moving beyond simple functions Data comparisons using operators Managing related data with triggers Auditing changes Data cleaning Custom sort orders Programming best practices KISS – keep it simple stupid DRY – don’t repeat yourself YAGNI – you ain’t gonna need it SOA – service-oriented architecture Type extensibility Caching Wrapping up – why program in the server? Performance Ease of maintenance Improved productivity Simple ways to tighten security Summary 2. Server Programming Environments Cost of acquisition Availability of developers Licensing Predictability Community Procedural languages Third-party tools Platform compatibility Application design Databases are considered harmful Encapsulation What does PostgreSQL offer? Data locality More basics Transactions General error reporting and error handling User-defined functions Other parameters More control Summary 3. Your First PL/pgSQL Function Why PL/pgSQL? The structure of a PL/pgSQL function Accessing function arguments Conditional expressions Loops with counters Statement termination Looping through query results PERFORM versus SELECT Looping Through Arrays Returning a record Acting on the function’s results Summary 4. Returning Structured Data Sets and arrays Returning sets Returning a set of integers Using a set returning function Functions based on views OUT parameters and records OUT parameters Returning records Using RETURNS TABLE Returning with no predefined structure Returning SETOF ANY Variadic argument lists A summary of the RETURN SETOF variants Returning cursors Iterating over cursors returned from another function Wrapping up of functions returning cursors Other ways to work with structured data Complex data types for the modern world – XML and JSON XML data type and returning data as XML from functions Returning data in the JSON format Summary 5. PL/pgSQL Trigger Functions Creating the trigger function Creating the trigger Working on a simple “Hey, I’m called” trigger The audit trigger Disallowing DELETE Disallowing TRUNCATE Modifying the NEW record The timestamping trigger The immutable fields trigger Controlling when a trigger is called Conditional triggers Triggers on specific field changes Visibility Most importantly – use triggers cautiously! Variables passed to the PL/pgSQL TRIGGER function Summary 6. PostgreSQL Event Triggers Use cases for creating event triggers Creating event triggers Creating an audit trail Preventing schema changes A roadmap of event triggers Summary 7. Debugging PL/pgSQL Manual debugging with RAISE NOTICE Throwing exceptions Logging to a file The advantages of RAISE NOTICE The disadvantages of RAISE NOTICE Visual debugging Installing the debugger Installing the debugger from the source Installing pgAdmin3 Using the debugger The advantages of the debugger The disadvantages of the debugger Summary 8. Using Unrestricted Languages Are untrusted languages inferior to trusted ones? Can you use untrusted languages for important functions? Will untrusted languages corrupt the database? Why untrusted? Why PL/Python? Quick introduction to PL/Python A minimal PL/Python function Data type conversions Writing simple functions in PL/Python A simple function Functions returning a record Table functions Running queries in the database Running simple queries Using prepared queries Caching prepared queries Writing trigger functions in PL/Python Exploring the inputs of a trigger A log trigger Constructing queries Handling exceptions Atomicity in Python Debugging PL/Python Using plpy.notice() to track the function’s progress Using assert Redirecting sys.stdout and sys.stderr Thinking out of the “SQL database server” box Generating thumbnails when saving images Sending an e-mail Listing directory contents Summary 9. Writing Advanced Functions in C The simplest C function – return (a + b) add_func.c Version 0 call conventions Makefile CREATE FUNCTION add(int, int) add_func.sql.in Summary for writing a C function Adding functionality to add(int, int) Smart handling of NULL arguments Working with any number of arguments Basic guidelines for writing C code Memory allocation Use palloc() and pfree() Zero-fill the structures Include files Public symbol names Error reporting from C functions “Error” states that are not errors When are messages sent to the client? Running queries and calling PostgreSQL functions A sample C function using SPI Visibility of data changes More info on SPI_* functions Handling records as arguments or returned values Returning a single tuple of a complex type Extracting fields from an argument tuple Constructing a return tuple Interlude – what is Datum? Returning a set of records Fast capturing of database changes Doing something at commit/rollback Synchronizing between backends Writing functions in C++ Additional resources for C Summary 10. Scaling Your Database with PL/Proxy Creating a simple single-server chat Dealing with success – splitting tables over multiple databases What expansion plans work and when? Moving to a bigger server Master-slave replication – moving reads to slave Multimaster replication Data partitioning across multiple servers Splitting the data PL/Proxy – the partitioning language Installing PL/Proxy The PL/Proxy language syntax CONNECT, CLUSTER, and RUN ON SELECT and TARGET SPLIT – distributing array elements over several partitions The distribution of data Configuring the PL/Proxy cluster using functions Configuring the PL/Proxy cluster using SQL/MED Moving data from the single to the partitioned database Connection Pooling Summary 11. PL/Perl – Perl Procedural Language When to use PL/Perl Installing PL/Perl A simple PL/Perl function Passing and returning non-scalar types Writing PL/Perl triggers Untrusted Perl Summary 12. PL/Tcl – Tcl Procedural Language Installing PL/Tcl A simple PL/Tcl function Null checking with Strict functions The parameter format Passing and returning arrays Passing composite-type arguments Accessing databases Writing PL/Tcl triggers Untrusted Tcl Summary 13. Publishing Your Code as PostgreSQL Extensions When to create an extension Unpackaged extensions Extension versions The .control file Building an extension Installing an extension Viewing extensions Publishing your extension Introduction to PostgreSQL Extension Network Signing up to publish your extension Creating an extension project the easy way Providing the metadata about the extension Writing your extension code Creating the package Submitting the package to PGXN Installing an extension from PGXN Summary 14. PostgreSQL as an Extensible RDBMS What can’t be extended? Creating a new operator Overloading an operator Optimizing operators COMMUTATOR NEGATOR Creating index access methods Creating user-defined aggregates Using foreign data wrappers Summary Index PostgreSQL Server Programming Second Edition PostgreSQL Server Programming Second Edition Copyright © 2015 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2013 Second edition: February 2015 Production reference: 1210215 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78398-058-1 www.packtpub.com Credits Authors Usama Dar Hannu Krosing Jim Mlodgenski Kirk Roybal Reviewers Stephen Frost Rick van Hattem Vibhor Kumar Jeff Lawson Mariano Reingart Julien Tachoires Commissioning Editor Usha Iyer Acquisition Editors Antony Lowe Meeta Rajani Sam Wood Content Development Editor Adrian Raposo Technical Editors Mrunmayee Patil Chinmay Puranik Copy Editors Dipti Kapadia Aarti Saldanha Project Coordinator Kinjal Bari Proofreaders Maria Gould Linda Morris Indexer Monica Ajmera Mehta Production Coordinator Nitesh Thakur Cover Work Nitesh Thakur About the Authors Usama Dar is a seasoned software developer and architect. During his 14 years’ career, he has worked extensively with PostgreSQL and other database technologies. He worked on PostgreSQL internals extensively while he was working for EnterpriseDB. Currently, he lives in Munich where he works for Huawei’s European Research Center. He designs the next generation of high-performance database systems
Recommended publications
  • Delivering Oracle Compatibility
    DELIVERING ORACLE COMPATIBILITY A White Paper by EnterpriseDB www.EnterpriseDB.com TABLE OF CONTENTS Executive Summary 4 Introducing EnterpriseDB Advanced Server 6 SQL Compatibility 6 PL/SQL Compatibility 9 Data Dictionary Views 11 Programming Flexibility and Drivers 12 Transfer Tools 12 Database Replication 13 Enterprise-Class Reliability and Scalability 13 Oracle-Like Tools 14 Conclusion 15 Downloading EnterpriseDB 15 EnterpriseDB EXECUTIVE SUMMARY Enterprises running Oracle® are generally interested in alternative databases for at least three reasons. First, these enterprises are experiencing budget constraints and need to lower their database Total Cost of Ownership (TCO). Second, they are trying to gain greater licensing flexibility to become more agile within the company and in the larger market. Finally, they are actively pursuing vendors who will provide superior technical support and a richer customer experience. And, subsequently, enterprises are looking for a solution that will complement their existing infrastructure and skills. The traditional database vendors have been unable to provide the combination of all three benefits. While Microsoft SQL ServerTM and IBM DB2TM may provide the flexibility and rich customer experience, they cannot significantly reduce TCO. Open source databases, on the other hand, can provide the TCO benefits and the flexibility. However, these open source databases either lack the enterprise-class features that today’s mission critical applications require or they are not equipped to provide the enterprise-class support required by these organizations. Finally, none of the databases mentioned above provide the database compatibility and interoperability that complements their existing applications and staff. The fear of the costs of changing databases, including costs related to application re-coding and personnel re-training, outweigh the expected savings and, therefore, these enterprises remain paralyzed and locked into Oracle.
    [Show full text]
  • Cruise Shipboard Property Management System Security Guide Release 19.1 F20778-01
    Oracle® Hospitality Cruise Shipboard Property Management System Security Guide Release 19.1 F20778-01 February 2020 Copyright © 1995, 2020, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications.
    [Show full text]
  • Tools User Guide Release 8.0 E84869-03
    Oracle® Hospitality Cruise Shipboard Property Management System Tools User Guide Release 8.0 E84869-03 December 2019 Copyright © 1995, 2019, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.
    [Show full text]
  • Forensic Attribution Challenges During Forensic Examinations of Databases
    Forensic Attribution Challenges During Forensic Examinations Of Databases by Werner Karl Hauger Submitted in fulfilment of the requirements for the degree Master of Science (Computer Science) in the Faculty of Engineering, Built Environment and Information Technology University of Pretoria, Pretoria September 2018 Publication data: Werner Karl Hauger. Forensic Attribution Challenges During Forensic Examinations Of Databases. Master's disser- tation, University of Pretoria, Department of Computer Science, Pretoria, South Africa, September 2018. Electronic, hyperlinked versions of this dissertation are available online, as Adobe PDF files, at: https://repository.up.ac.za/ Forensic Attribution Challenges During Forensic Examinations Of Databases by Werner Karl Hauger E-mail: [email protected] Abstract An aspect of database forensics that has not yet received much attention in the aca- demic research community is the attribution of actions performed in a database. When forensic attribution is performed for actions executed in computer systems, it is nec- essary to avoid incorrectly attributing actions to processes or actors. This is because the outcome of forensic attribution may be used to determine civil or criminal liabil- ity. Therefore, correctness is extremely important when attributing actions in computer systems, also when performing forensic attribution in databases. Any circumstances that can compromise the correctness of the attribution results need to be identified and addressed. This dissertation explores possible challenges when performing forensic attribution in databases. What can prevent the correct attribution of actions performed in a database? The first identified challenge is the database trigger, which has not yet been studied in the context of forensic examinations. Therefore, the dissertation investigates the impact of database triggers on forensic examinations by examining two sub questions.
    [Show full text]
  • Sql Server to Aurora Postgresql Migration Playbook
    Microsoft SQL Server To Amazon Aurora with Post- greSQL Compatibility Migration Playbook 1.0 Preliminary September 2018 © 2018 Amazon Web Services, Inc. or its affiliates. All rights reserved. Notices This document is provided for informational purposes only. It represents AWS’s current product offer- ings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS’s products or services, each of which is provided “as is” without war- ranty of any kind, whether express or implied. This document does not create any warranties, rep- resentations, contractual commitments, conditions or assurances from AWS, its affiliates, suppliers or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agree- ments, and this document is not part of, nor does it modify, any agreement between AWS and its cus- tomers. - 2 - Table of Contents Introduction 9 Tables of Feature Compatibility 12 AWS Schema and Data Migration Tools 20 AWS Schema Conversion Tool (SCT) 21 Overview 21 Migrating a Database 21 SCT Action Code Index 31 Creating Tables 32 Data Types 32 Collations 33 PIVOT and UNPIVOT 33 TOP and FETCH 34 Cursors 34 Flow Control 35 Transaction Isolation 35 Stored Procedures 36 Triggers 36 MERGE 37 Query hints and plan guides 37 Full Text Search 38 Indexes 38 Partitioning 39 Backup 40 SQL Server Mail 40 SQL Server Agent 41 Service Broker 41 XML 42 Constraints
    [Show full text]
  • Modèle Bull 2009 Blanc Fr
    CNAF PostgreSQL project Philippe BEAUDOIN, Project leader [email protected] 2010, Dec 7 CNAF - Caisse Nationale des Allocations Familiales - Key organization of the French social security system - Distributes benefits to help - Families - Poor people - 123 CAF (local organizations) all over France - 11 million families and 30 million people - 69 billion € in benefits distributed (2008) 2 ©Bull, 2010 CNAF PostgreSQL project The project … in a few clicks GCOS 8 GCOS 8 CRISTAL SDP CRISTAL SDP (Cobol) (Cobol) (Cobol) (Cobol) DBSP RFM-II RHEL-LINUX PostgreSQL Bull - NovaScale 9000 servers (mainframes) 3 ©Bull, 2010 CNAF PostgreSQL project DBSP GCOS 8 CRISTAL SDP (Cobol) (Cobol) InfiniBand link LINUX S.C. S.C. (c+SQL) (c+SQL) PostgreSQL S.C. = Surrogate Client 4 ©Bull, 2010 CNAF PostgreSQL project CNAF I.S. - CRISTAL + SDP : heart of the Information System - Same application running on Bull (GCOS 8) and IBM (z/OS+DB2) mainframes - Also J2E servers, under AIX, … and a lot of peripheral applications - 6 to 8 CRISTAL versions per year ! 5 ©Bull, 2010 CNAF PostgreSQL project Migration to PostgreSQL project plan - A lot of teams all over France (developers, testers, production,...) - 3 domains - CRISTAL application, SDP application - Infrastructure and production - National project leading CRISTAL Developmt Tests 1 CAF C. Deployment C. PRODUCTION Preparation 1 Depl S SDP Develpmt Tests 9/08 1/09 5/09 9/09 12/09 3/10 6 ©Bull, 2010 CNAF PostgreSQL project How BULL participated to the project - Assistance to project leading - Technical expertise
    [Show full text]
  • Data Migration
    Data Migration DISSECTING THE WHAT, THE WHY, AND THE HOW 02 Table of Contents The What 04 What Is Data Migration? 05 Types of Data Migration 05 Database Migration 05 Application Migration 05 Storage Migration 06 Cloud Migration 06 The Why 07 Situations That Prompt Data Migration 08 Challenges in Data Migration 08 1. The Complexity of Source Data 08 2. Loss of Data or Corrupt Data 08 3. Need for In-Depth Testing and Validation 08 Factors that Impact the Success of a Data Migration Process 09 Is Your Migration Project Getting the Attention It Needs? 09 Thoroughly Understand the Design Requirements 09 Budget for the Field Expert 10 Collaborate with the End Users 10 Migration Isn’t Done in OneGo 10 Backup Source Data 10 Migration Doesn’t Make Old Systems Useless 11 Plan for the Future 11 The How 12 Data Migration Techniques 13 Extract, Load, Transform (ETL) 14 The 7 R’s of Data Migration 14 Data Migration Tools 14 Finding the Right Migration Software – Features to Consider 15 Easy Data Mapping 15 Advanced Data Integration and Transformation Capabilities 15 Enhanced Connectivity 15 Automated Data Migration 15 Planning to Migrate? Steps to A Successful Enterprise Data Migration 16 1. Design a Strategy 16 2. Assess and Analyze 16 3. Collect and Cleanse Data 16 4. Sort Data 17 5. Validate Data 18 6. Migrate 19 Conclusion 20 Astera Centerprise – Making the Data Migration Process Painless 21 About Astera Software 22 03 Summary With data of varying formats pouring in from different systems, the existing system may require an upgrade to a larger server.
    [Show full text]
  • Install and Setup Guide for Cisco Security MARS Release 5.3.X March 2008
    Install and Setup Guide for Cisco Security MARS Release 5.3.x March 2008 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883 Customer Order Number: Text Part Number: OL-14672-01 THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS. THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY. The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB’s public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California. NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    [Show full text]
  • On Snakes and Elephants Using Python Inside Postgresql
    On snakes and elephants Using Python inside PostgreSQL Jan Urba´nski [email protected] New Relic PyWaw Summit 2015, Warsaw, May 26 Jan Urba´nski (New Relic) On snakes and elephants PyWaw Summit 1 / 32 For those following at home Getting the slides $ wget http://wulczer.org/pywaw-summit.pdf Jan Urba´nski (New Relic) On snakes and elephants PyWaw Summit 2 / 32 1 Introduction Stored procedures PostgreSQL's specifics 2 The PL/Python language Implementation Examples 3 Using PL/Python Real-life applications Best practices Jan Urba´nski (New Relic) On snakes and elephants PyWaw Summit 3 / 32 Outline 1 Introduction Stored procedures PostgreSQL's specifics 2 The PL/Python language 3 Using PL/Python Jan Urba´nski (New Relic) On snakes and elephants PyWaw Summit 4 / 32 What are stored procedures I procedural code callable from SQL I used to implement operations that are not easily expressed in SQL I encapsulate business logic Jan Urba´nski (New Relic) On snakes and elephants PyWaw Summit 5 / 32 Stored procedure examples Calling stored procedures SELECT purge_user_records(142); SELECT lower(username) FROM users; CREATE TRIGGER notify_user_trig AFTER UPDATEON users EXECUTE PROCEDURE notify_user(); Jan Urba´nski (New Relic) On snakes and elephants PyWaw Summit 6 / 32 Stored procedure languages I most RDBMS have one blessed language in which stored procedures can we written I Oracle has PL/SQL I MS SQL Server has T-SQL I but Postgres is better Jan Urba´nski (New Relic) On snakes and elephants PyWaw Summit 7 / 32 Stored procedures in Postgres I a stored
    [Show full text]
  • Ubuntu Server Guide Basic Installation Preparing to Install
    Ubuntu Server Guide Welcome to the Ubuntu Server Guide! This site includes information on using Ubuntu Server for the latest LTS release, Ubuntu 20.04 LTS (Focal Fossa). For an offline version as well as versions for previous releases see below. Improving the Documentation If you find any errors or have suggestions for improvements to pages, please use the link at thebottomof each topic titled: “Help improve this document in the forum.” This link will take you to the Server Discourse forum for the specific page you are viewing. There you can share your comments or let us know aboutbugs with any page. PDFs and Previous Releases Below are links to the previous Ubuntu Server release server guides as well as an offline copy of the current version of this site: Ubuntu 20.04 LTS (Focal Fossa): PDF Ubuntu 18.04 LTS (Bionic Beaver): Web and PDF Ubuntu 16.04 LTS (Xenial Xerus): Web and PDF Support There are a couple of different ways that the Ubuntu Server edition is supported: commercial support and community support. The main commercial support (and development funding) is available from Canonical, Ltd. They supply reasonably- priced support contracts on a per desktop or per-server basis. For more information see the Ubuntu Advantage page. Community support is also provided by dedicated individuals and companies that wish to make Ubuntu the best distribution possible. Support is provided through multiple mailing lists, IRC channels, forums, blogs, wikis, etc. The large amount of information available can be overwhelming, but a good search engine query can usually provide an answer to your questions.
    [Show full text]
  • Mysql to Postgres Migration
    MySQL to Postgres Migration Deepak Murthy Who am I Database Administrator working at Pictage Inc The company provides online image hosting, printing and sales solutions, and services to professional photographers. The company is a leader in the industry. Pictage services more than 10,000 professional photographers all over the United States. Pictage is the photographer's one-stop and complete partner enabling online viewing, selling, and printing professional images. www.pictage.com www.shootq.com mysql2psql It can create postgresql dump file from mysql database or directly load data from mysql to postgresql (at about 100 000 records per minute). Translates most data types and indexes. Authors Max Lapshin et. al contents Installation requirements Things to take care before migration Migration of only schema Migration of only data Migration of both schema and data Excluding tables during migration Migrating only the selected tables Things to take care after migration Problems during migration Installation requirements Postgres 8.4 and above, Mysql 5.1 and above Ruby 1.9.1 – latest version Ruby gem 1.8.14 - Package manager for Ruby postgresql-server-dev-9.1 - The postgresql-devel package contains the header files and libraries ruby1.9.1-dev: This package contains the header files and library, necessary to make extension library for Ruby 1.9.1 Other libraries required: libmysqlclient-dev, libmysql- ruby1.9 Install Ruby postgresql interface (gem install pg) and Ruby mysql interface (gem install mysql) Things to take care before migration Generate a mysql2pgsql.yml file Create a separate user to access the mysql database or existing user which has capability to dump the database.
    [Show full text]
  • Unisys to AWS Reference Architecture
    Unisys to AWS Reference Architecture Astadia Mainframe-to-Cloud Modernization Series Unisys to AWS Reference Architecture Abstract In businesses today, across all market segments, cloud computing has become the focus of current and future technology needs for the enterprise. The cloud offers compelling economics, the latest technologies and platforms, and the agility to adapt your information systems quickly and efficiently. However, many large organizations are burdened by much older, previous generation platforms, typically in the form of a mainframe computing environment. Although old and very expensive to maintain, the mainframe platform continues to run the most important information systems of an organization. The purpose of this reference architecture is to assist business and IT professionals as they prepare plans and project teams to start the process of moving mainframe-based application portfolios to Amazon Web Services (AWS). We will also share various techniques and methodologies that may be used in forming a complete and effective Legacy Modernization plan. In this document, we will explore: Why modernize a mainframe The challenges associated with mainframe modernization An overview of the Unisys mainframe The Unisys to AWS Reference Architecture An overview of AWS services A look at the Astadia Success Methodology This document is part of the Astadia Mainframe to Cloud Modernization Series that leverages Astadia’s 25+ years of mainframe platform modernization expertise. © 2017 Astadia. Inc. - All rights reserved. 12724 Gran Bay Parkway, Suite 300 Jacksonville, FL 32258 All other copyrights and trademarks the property of their respective owners. Unisys to AWS Reference Architecture Contents Introduction ............................................................................................................................ 1 Why Should We Migrate Our Mainframe Apps to AWS? ........................................................
    [Show full text]