sudo yum -y install epel-release
sudo yum -y update
Download repository
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;-- Then change column name of your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
| ;################################################### | |
| ; NOTE | |
| ;#################################################### | |
| ; change your curl.ini on /etc/php.d/curl.ini | |
| ; | |
| ;This config was only tested on amazon AMI | |
| ;Please check if /etc/ssl/certs/ca-bundle.crt exists | |
| ; | |
| ;If you don't have the ca-bundle root certificate you | |
| ; can get this in |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| Elastic Load Balancer, CloudFront and Let's Encrypt |
| // By default the memory limit in Node.js is 512MB. | |
| // This will cause FATAL ERROR- JS Allocation failed – process out of memory when processing large data files. | |
| // It can be avoided by increasing the memory limit. | |
| node --max_old_space_size=1024 server.js // increase to 1gb | |
| node --max_old_space_size=2048 server.js // increase to 2gb | |
| node --max_old_space_size=3072 server.js // increase to 3gb | |
| node --max_old_space_size=4096 server.js // increase to 4gb | |
| node --max_old_space_size=5120 server.js // increase to 5gb | |
| node --max_old_space_size=6144 server.js // increase to 6gb |