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
Explore 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
Learning Heroku Postgres
Learning Heroku Postgres

Learning Heroku Postgres: Efficiently design, implement, and manage a successful PostgreSQL database with Heroku

Arrow left icon
Profile Icon Patrick Rafael de Oliveira Espake
Arrow right icon
$32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (4 Ratings)
Paperback Feb 2015 164 pages 1st Edition
eBook
$9.99 $19.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Patrick Rafael de Oliveira Espake
Arrow right icon
$32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (4 Ratings)
Paperback Feb 2015 164 pages 1st Edition
eBook
$9.99 $19.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $19.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Learning Heroku Postgres

Chapter 1. Getting Started with Heroku Postgres

Heroku simplifies the infrastructure of web applications. With its architecture, it is possible to create robust, manageable, and scalable applications according to the needs of your business.

This book is focused on how Heroku works with PostgreSQL. It will cover pieces of architecture and how to build applications that benefit from Heroku Postgres. In this first chapter, you will learn about the key concepts of Heroku, how it works, what are the supported versions of PostgreSQL, how to choose the best plan according to your need, and how high availability works. The concepts covered in this chapter are fundamental to understanding the other chapters.

In this chapter, will cover the following topics:

  • How does Heroku work?
  • Postgres supported versions
  • Choosing the right Heroku Postgres plan
  • Production-tier technical characterization
  • High availability

How does Heroku work?

Heroku is a multi-language cloud platform that enables you to deploy applications written in several programming languages such as Ruby, Java, Python, Clojure, Scala, and Node.js. The list of supported programming languages is always growing.

The main idea of Heroku is to take away the pain of managing and scaling servers, so you can focus on the development of your product and deliver more functionality to your client, where Heroku is responsible for the infrastructure.

You don't need knowledge of servers to build a robust application with millions of users around the world.

Heroku Dashboard and Heroku Toolbelt

Heroku has a dashboard where you can easily manage your application. Through this dashboard, you can manage your resources, dynos, workers, add-ons, metrics, activity log, access permissions, and settings. In this chapter, you will learn to better understand these items.

Heroku Dashboard and Heroku Toolbelt

Heroku Dashboard

Heroku also provides a command-line client to manage your applications. This client is called Heroku Toolbelt and is available at https://toolbelt.heroku.com. It is available for Mac OS X, Windows, Debian/Ubuntu, or in standalone mode. Heroku Toolbelt is a set of tools for managing and displaying the information about your applications. Most developers prefer to use Heroku Toolbelt instead of Heroku Dashboard because of the command-line facilities, in addition to offering a broader set of information. In the following chapter, you will understand how it works.

Heroku Dashboard and Heroku Toolbelt

Heroku Toolbelt

Deploying your applications

The first item you need to understand is how the deploy process happens. An application is a collection of code with its associated dependencies. In the case of Ruby on Rails, these dependencies are found in Gemfile in Python requirements.txt, in Node.js package.json, and in Java pom.xml. This gives further information on how Heroku should work with your code.

If you use Ruby, Node.js, Python, or Java, Heroku can easily identify how to make your code executable, through the conventions that these languages adopt. For example, in the case of Ruby on Rails, Heroku knows it needs to run the Rails server to run your application.

If Heroku cannot run your application, you need to show how to do it. You must do so through the creation of a Procfile in your project, which contains instructions on how to run your application, as follows:

web: java –jar lib/my_app.jar $PORT

Tip

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Heroku has adopted a very simple way to send your code to deploy. Each application built on Heroku has a Git repository, you should do a git push heroku master to start the deploy process. In the next chapter, you will deploy your first application and understand it better.

Heroku handles your code and dependencies by generating an optimized slug of your application. This slug is placed in each dyno that you have and each slug contains a compressed copy of your application. The slug is created by the slug compiler and its core is a collection of scripts called a buildpack. For each language supported by Heroku, there is one buildpack available. You can find more information about each of them in their repositories on GitHub:

The dyno manager is responsible for managing each dyno with your application slug.

Heroku architecture

Heroku's architecture is very robust and equipped to work with small applications such as blogs, personal websites, and large applications with a lot of users, such as Ello and Toyota.

This architecture serves the entire operation flow of its application, providing the mechanism to deploy your code until the management and scalability of your application.

The following diagram shows this architecture:

Heroku architecture

HTTP routing

The Heroku platform receives HTTP requests coming from the entry point herokuapp.com or by your custom domain, and forwards these requests to the load balancer, then to the routing mesh that distributes it for each dyno. The routing mesh is a personalized solution developed in Erlang based on MochiWeb (https://github.com/mochi/mochiweb). Each dyno has its own queue of requests to be processed. When a dyno is available, it picks up a request from its queue and the application inside the dyno processes it.

HTTP routing

Heroku HTTP routing

Dyno Manager

The Dyno Manager is responsible for maintaining the dynos running. When some dyno presents a problem, it is automatically replaced by a new dyno and the application information is loaded through the slug generated during the deploy. Because of the Dyno Manager, you do not need to make any changes to the operating system or other internal settings. Everything is done in an automated way.

Config vars

The traditional approach is setting the configuration variables in the source code of your application; this approach is not useful, especially when you have many environments such as production, development, and test. The safer approach is creating environment variables. Heroku works with environment variables called config vars.

Config vars are necessary to run your application. Some of these variables are provided by Heroku and others are provided by add-ons that you have installed. You can also add your own config vars. For example, for Postgres add-on the config vars are provided credentials to access the database. All the provided dynos have the same set of config vars. These variables are copied automatically when you create a new dyno.

Understanding the Dynos

A dyno is a single virtualization in a Unix container. This container contains the slug of your application created during the deploy and you can add more dynos at anytime for scaling your application. The dyno does not persist changes in the filesystem and does not contain a database. To save files, you need to use a shared service such as Amazon AWS S3 (Simple Storage Service), and use the data store's add-ons such as Heroku Postgres, ClearDB MySQL Database, MongoLab (MongoDB), Redis Cloud, GrapheneDB, or others to share a database data between your dynos. You can see all the available data stores' add-ons at https://addons.heroku.com/#data-stores.

Understanding the Dynos

Heroku Dynos

Workers

Workers are responsible for running background jobs in your applications hosted on Heroku. This is a key feature for building really scalable web applications. Through the workers, your applications can resize images, perform data upload to other servers, fetch API data, send e-mail, and perform many other tasks in the background. Your web requests always return immediately improving the user experience. On Heroku, the workers are scalable, so you can increase or decrease the quantity at anytime.

Add-ons

Heroku has a marketplace of add-ons. The idea of these add-ons is to provide integration with third-party services simply and seamlessly into your applications hosted on Heroku. Currently, there is a wide variety of add-ons that are divided in categories: Data Stores, Mobile, Search, Logging, e-mail, SMS, Workers and Queueing, Analytics, Caching, Monitoring, Media, Utilities, and Payments. Add-ons include Heroku Postgres, PG Backups, MemCachier, AirBrake, New Relic APM, Logentries, Deploy Hooks, Heroku Scheduler, Zerigo DNS, SSL, Websolr, SendGrid, Mandrill by MailChimp, and Codeship. You can meet these add-ons at https://addons.heroku.com/.

PostgreSQL is provided on Heroku via an add-on called Heroku Postgres. This add-on has a number of plans that vary in their features such as cache size, storage limit, limit of simultaneous connections, and the ability to work with forks and followers. In the Choosing the right Heroku Postgres plan section, you will understand more about these differences.

Logplex

Logplex is a distributed log collector, able to merge and redistribute multiple input streams to individual subscribers. Logs are collected from your app and other components of the Heroku platform. You can query this information through the Heroko Toolbelt or using the public API Logplex. These logs are collected from all the dynos and components that you have on Heroku.

Heroku API

The Heroku platform API allows you to create automated tasks, such as creating applications, collecting information from applications, managing add-ons, or performing other tasks programmatically, which previously could only be done through the Heroku dashboard. For example, Heroku Toolbelt uses Heroku API to perform its tasks.

Postgres supported versions

PostgreSQL is a relational database, open source, and very powerful. It has over 20 years of development and has a proved and reliable architecture. It is commonly adopted in many applications because of the following advantages:

  • An open-source SQL standard compliant RDBMS
  • Strong community
  • Strong third-party support
  • Extensible
  • Objective

PostgreSQL is provided on Heroku via an add-on. This add-on has a free initial plan, only for small applications such as websites or blogs and then is available at a given series of paid plans, according to your need.

Each year a new version of PostgreSQL is released and Heroku adopts the newest version as standard in a very short time. Heroku keeps the current version and the last three versions. The versions currently available are:

  • 9.4 (beta)
  • 9.3 (default)
  • 9.2
  • 9.1
  • 9.0 (deprecated, support ended December 3, 2014)

This means that every three years you need to upgrade the version of PostgreSQL used in your application because a new version of PostgreSQL is available and the last one is deprecated.

Choosing the right Heroku Postgres plan

Heroku offers three lines of plans with some differences in characteristics, these changes were made to suit small applications to applications that have a large volume of data or need transactional control.

Choosing the best plan will depend on the needs of your application. At any time, you can upgrade your database plan and optimize your application with a very short period of downtime. You will see more information about this in Chapter 6, Rollback, Followers, and Forks.

The main variations between the plans are expected downtime supported:

  • Hobby tier tolerates 4 hours of downtime and is used for small and simple applications.
  • Standard tier tolerates 1 hour of downtime and is used for production applications.
  • Premium tier tolerates 15 minutes of downtime and is used for production applications where uptime is important.

The following table shows the main differences between the plans offered by Heroku and their respective prices:

Plan

Connection Limit

Row Limit

RAM

Storage

Price

Hobby Dev

20

10,000

0 Bytes

No

Free

Hobby Basic

20

10,000,000

0 Bytes

No

$9/mo

Standard 0

120

Unlimited

1 GB

64 GB

$50/mo

Premium 0

120

Unlimited

1 GB

64 GB

$200/mo

Standard 2

400

Unlimited

3.5 GB

256 GB

$200/mo

Premium 2

400

Unlimited

3.5 GB

256 GB

$350/mo

Standard 4

500

Unlimited

15 GB

512 GB

$750/mo

Premium 4

500

Unlimited

15 GB

512 GB

$1200/mo

Standard 5

500

Unlimited

30 GB

1 TB

$1400/mo

Standard 6

500

Unlimited

60 GB

1 TB

$2000/mo

Premium 5

500

Unlimited

30 GB

1 TB

$2500/mo

Premium 6

500

Unlimited

60 GB

1 TB

$3500/mo

Standard 7

500

Unlimited

120 GB

1 TB

$3500/mo

Premium 7

500

Unlimited

120 GB

1 TB

$6000/mo

Shared features

All the plans share the following features:

  • Data clips to share data and queries with others people securely
  • SSL protection to access psql/libpq
  • Postgres extensions
  • Web UI interface to manage the database
  • Unmodified versions of Postgres
  • Database service fully managed for automatic health checks
  • Write-ahead log (WAL) that ensures minimal data loss in case of catastrophic failure, storing every minute

Production-tier technical characterization

The Standard, Premium, and Enterprise plans are offered for production applications that require certain operating characteristics based on multitenancy architectures, CPU, RAM, and IO. These characteristics can be more easily understood with the help of the following table:

Plan

vCPU

RAM

Disk Size

Connection Limit

PIOPs

Multitenant

Standard 0

Premium 0

2

1 GB

64 GB

120

200

Yes

Standard 2

Premium 2

2

3.5 GB

256 GB

400

200

Yes

Standard 4

Premium 4

2

15 GB

512 GB

500

1000

No

Standard 5

Premium 5

4

30 GB

1 TB

500

2000

No

Standard 6

Premium 6

8

60 GB

1 TB

500

3000

No

Standard 7

Premium 7

Enterprise 7

16

120 GB

1 TB

500

4000

No

Enterprise 8

32

240 GB

1 TB

500

4000

No

All plans run a 64-bit architecture, which ensures the best performance for the internal operations of Postgres. Heroku Postgres runs on a virtual infrastructure provided by Amazon AWS EC2.

The vCPU is the number of virtual processors in the instance and RAM is the amount of memory used to data cache. The PIOPs are a measure of how many IO disk operations can be performed per second.

For applications that require a lot of writes, IO can be a critical point. The data sets should fit in RAM, which ensures high performance with lower values of IOPs (Input/Output operations per second).

Finally, multitenancy refers to the principle of software architecture where a software instance is a server serving multiple client organizations (tenants).

High availability

The plans of the Premium and Enterprise tier comes with the High Availability feature. This feature involves a cluster database and a management system to increase availability in case of failure.

When the database fails, it is automatically replaced by another. To determine that a failure occurred, Heroku starts a series of checks. This process can take up to 2 minutes. Because of the continuous protection mechanism, Heroku minimizes data loss, usually to 160 MB or 10 minutes, whichever is less.

When the recovery process finishes, new access credentials are generated and the database URL is changed. Finally the Heroku application is restarted with the new access data to the database.

Self-test Questions

Answer true or false:

  1. Is Heroku a multi-language platform?
  2. Using Heroku, does the developer have many concerns about infrastructure?
  3. Is Heroku Toolbelt the most powerful way to manage your apps on Heroku?
  4. Is it possible to deploy applications on Heroku via FTP?
  5. Is dyno a virtualization of a Unix container?
  6. Does Heroku always support the latest 10 versions of PostgreSQL?
  7. Do the plans of the Premium tier tolerate 30 minutes of downtime?
  8. Do all plans of Heroku run a 64-bit architecture?
  9. Do only Standard plans have the capability of High Availability?
  10. When a new database is built upon failure access, are the credentials changed?

Summary

In this chapter, you have learned how Heroku works, how to transform your application into a slug with dependencies that can be distributed across multiple dynos, making your application scalable. You have also learned that by default Heroku supports the current version of PostgreSQL and the last three versions, and every three years you need to upgrade the version used in your application.

You have also learned about the structure of the Heroku plans and your characteristics, where the Hobby plans are more oriented for blogs or personal websites, while the Standard, Premium, and Enterprise plans are ideal for production applications. You understood that the downtime of each plan must be taken into consideration to choose the plan that is best for your business.

You also got knowledge about the characterization of the Standard, Premium, and Enterprise plans and that there are variations of plans based on the usage of vCPU, RAM, and IO.

Finally, you learned the High Availability feature that manages and monitors the application and database in case of a failure. When a new database is created, the credentials are changed.

In the next chapter, you will learn about the Heroku Toolbelt and all tools you need to get started with using Heroku at the command line.

Left arrow icon Right arrow icon

Description

Learning Heroku Postgres is targeted at developers and database admins. Even if you're new to Heroku Postgres, you'll be able to master both the basic as well as advanced features of Heroku Postgres. Since Heroku Postgres is incredibly user-friendly, no previous experience in computer coding or programming is required.

What you will learn

  • Introduce yourself to the inner workings of Heroku Postgres
  • Deploy your first application with Heroku using the Heroku Toolbelt
  • Work with permission levels to connect your database with a number of programming languages
  • Secure your database using Postgres backups
  • Interact with your data and share it with Dataclips
  • Manage your data loss by performing rollbacks and working with followers and forks
  • Identify common errors by analyzing logs and viewing metrics
  • Add functionalities to your database with extensions such as PostGIS and Full Text Search Dictionaries
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 24, 2015
Length: 164 pages
Edition : 1st
Language : English
ISBN-13 : 9781782173458
Vendor :
PostgreSQL Global Development Group
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Feb 24, 2015
Length: 164 pages
Edition : 1st
Language : English
ISBN-13 : 9781782173458
Vendor :
PostgreSQL Global Development Group
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 148.97
Learning Heroku Postgres
$32.99
Heroku Cookbook
$54.99
Heroku Cloud Application Development
$60.99
Total $ 148.97 Stars icon

Table of Contents

11 Chapters
1. Getting Started with Heroku Postgres Chevron down icon Chevron up icon
2. Heroku Toolbelt Chevron down icon Chevron up icon
3. Postgres Add-on Chevron down icon Chevron up icon
4. PG Backups Chevron down icon Chevron up icon
5. Dataclips Chevron down icon Chevron up icon
6. Rollback, Followers, and Forks Chevron down icon Chevron up icon
7. Understanding Log Statements and Common Errors Chevron down icon Chevron up icon
8. Extensions, PostGIS, Full Text Search Dictionaries, Data Caching, and Tuning Chevron down icon Chevron up icon
A. Keyword List Chevron down icon Chevron up icon
B. Self-test Answers Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(4 Ratings)
5 star 25%
4 star 75%
3 star 0%
2 star 0%
1 star 0%
Diego Cassiano Apr 27, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book helped me to understand the structure of Heroku and gave me a solid background for my further projects.All topics are clean and concise.I liked it a lot.Diego Cassiano
Amazon Verified review Amazon
Shaun Thomas Jun 06, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Learning Heroku Postgres is a new book by Patrick Espake that seems intended to help new PostgreSQL database administrators get their data into the cloud. The chapters are short, concise, and the questionnaires at the end are a nice touch.Before I get too far into this review, I should point out that Heroku is a proprietary service that presents a modular deployment system for various programming languages, applications, administration, monitoring, and other related services. Though there are free hobby-level instances for most modules, it is a commercial platform which provides SAAS (Software as a Service) across multiple geographic locations. In order to leverage it properly, I recommend these hobby-level instances only for experimentation.To that end, this is very much a book that is a benefit to the PostgreSQL community. Small and large businesses often have trouble distributing data and applications in a high availability environment, and as such, Heroku is a potential solution for quick-and-dirty scalability at a reasonable cost.The book itself is essentially broken down into three major parts: Tooling, Basics, and Extras. Though this is not explicitly defined by the chapter overview, this is the way it reads. This is somewhat important, because it allows a bit of skipping around for users who are already familiar with PostgreSQL, Heroku, or both.The adventure begins with a couple short chapters on how Heroku itself is organized, and acquiring Heroku command-line tools for managing account features. Here, Espake presents a good bird's-eye view of Heroku's deployment infrastructure and configuration, and spends time discussing just how everything is decoupled and bound together by queues so the elastic infrastructure accurately represents the intention of the user. This is critical, as understanding the underlying landscape can (and should) directly influence development cycles, since readers must account for Heroku's quirks while organizing their application and associated data.From here, the discussion naturally moves to PostgreSQL itself in chapter three. Espake makes it clear that PostgreSQL is managed as a fully automated solution, behind a thick wall of tools, interfaces, and somewhat limited management commands. This is one of the most important chapters, as it effectively lays out all of the necessary commands for synchronizing data and accessing the database itself for more direct manipulation with SQL clients, languages, and drivers. Afterwards in chapter four, he addresses the topic of backups and how to secure and obtain them. Both of these chapters combine to give a reader control of how Heroku represents their data, and securing it from loss.Chapter five is something of an oddity. Espake introduces Heroku dataclips as a method for sharing data without talking about the reality of what they are: versioned views with an exposure API. This is the first time I got the impression that this book is more of a usage manual than a true learning resource. Yes it is important to show how data can be shared or downloaded with this feature, but after the introduction in chapter one regarding Heroku's operation, I found this omission particularly odd. Given how dataclips work, they could be *combined* with views for easier overall data management, and yet this option is never presented.Chapter six moves on to instance management. By this, I mean various uses for database replicas, such as forking, failover, and replacing the current database with a previous version. All the necessary commands and GUI options are here to make juggling multiple copies of the database easier. But again I see wasted opportunity. Heroku considers 'rollback' the act of replacing the primary instance with a previous backup instance. The fact that this directly conflicts with the concept of a transaction rollback is never discussed. Nor are database followers equated with PostgreSQL streaming replication, the mechanism that's probably behind the feature. I wish Espake spent more time explaining how things work, instead of just providing instructions. After all, that kind of information is probably available in Heroku's documentation; this book should provide a deeper understanding the user can leverage toward a better PostgreSQL cluster.The last two chapters tie up most of the remaining loose ends by covering logs and various PostgreSQL-specific extensions available on the Heroku platform. Chapter eight in particular is a laundry list of PostgreSQL extensions generally available within the contribution libraries commonly distributed with the PostgreSQL code or binaries. It's a good resource for users unfamiliar with this functionality, and further links are provided where necessary so the reader can explore, should that feature be relevant. While not really a feature of Heroku, or even especially relevant since most PostgreSQL distributions include them anyway, extensions are part of what make PostgreSQL so powerful, so I'll allow it.In the end, the book adequately covers numerous Heroku commands and interface elements. I wish the author spent more time talking about how some of Heroku's terminology conflicts with common database concepts. For example, Heroku's idea of 'promote' isn't quite what a seasoned database administrator would recognize. Allowing a new user absorb this interpretation without caveat, could lead to conceptual issues in the future. This happens often unfortunately, as I'd already mentioned regarding rollback. From chapter four onward, the book is organized like a manual as if it were written by an employee of Heroku, treating PostgreSQL as a mere Heroku module that needed a checklist of feature documentation. There's a reason this book is so short!Still, it's a good way to bootstrap a Heroku deployment of PostgreSQL. If there aren't more comprehensive books on integrating the two, there probably will be in the near future. Wait for these if you *really* want to delve into a Heroku deployment; for a newbie, you can't go wrong here.
Amazon Verified review Amazon
Ajay Thakur Apr 01, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This is a nice book.The author has explained things clearly on the topic.I give four stars for this one.
Amazon Verified review Amazon
Antwaan Jun 09, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I liked how modular the book is. I've been using Postgres and heroku professionally for around 3 years. I wish this read was around when I started. The author is very concise, however, I would have loved to see a chapter dedicated to potential errors one may face.Chapter 8 showed me a few new tools and extensions that I can't wait to introduce to future projects.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon