postgresql

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPostgresMaxConnections

func GetDefaultPostgresMaxConnections(instanceClass string) (int, error)

Aurora PostgreSQL: "LEAST({DBInstanceClassMemory/9531392},5000)" Default is set to this value for all instance classes. Note that the DBInstance Class Memory, which is 5000, is, DBInstanceClassMemory = 5000 * 9531392(Byte) = 47656960000(Byte)

= 47.65696(GB)

In other words, for instances with a memory size larger than 47.65696 GB, max_connection is 5000. ref: https://aws.amazon.com/rds/instance-types/

func GetPostgresMaxConnections

func GetPostgresMaxConnections(rawMaxConnections string, instanceClass *string) (int, error)

Parse rawMaxConnections and calculate with instance class.

Example of raw values: Aurora PostgreSQL: "LEAST({DBInstanceClassMemory/9531392},5000)" Aurora MySQL: "GREATEST({log(DBInstanceClassMemory/805306368)*45},{log(DBInstanceClassMemory/8187281408)*1000})" RDS Postgres: Same with Aurora PostgreSQL RDS MySQL: {DBInstanceClassMemory/12582880}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL