- Table Access Method (AM) definable
- Opens doors for Columnar storage, UNDO capabilities
- Multiple Tuple types: minimal, virtual and heap
- Aims to solve the chronic Bloat problem modern workloads face regularly
- Not Supported: WAL, non-heap catalogs
with | |
all_tables as | |
( | |
SELECT * | |
FROM ( | |
SELECT 'all'::text as table_name, | |
sum( (coalesce(heap_blks_read,0) + coalesce(idx_blks_read,0) + coalesce(toast_blks_read,0) + coalesce(tidx_blks_read,0)) ) as from_disk, | |
sum( (coalesce(heap_blks_hit,0) + coalesce(idx_blks_hit,0) + coalesce(toast_blks_hit,0) + coalesce(tidx_blks_hit,0)) ) as from_cache | |
FROM pg_statio_all_tables --> change to pg_statio_USER_tables if you want to check only user tables (excluding postgres's own tables) | |
) a |
WITH table_opts AS ( | |
SELECT | |
pg_class.oid, relname, nspname, array_to_string(reloptions, '') AS relopts | |
FROM | |
pg_class INNER JOIN pg_namespace ns ON relnamespace = ns.oid | |
), vacuum_settings AS ( | |
SELECT | |
oid, relname, nspname, | |
CASE | |
WHEN relopts LIKE '%autovacuum_vacuum_threshold%' |
-- Remediation from dictated changeset | |
-- https://github.com/postgis/postgis/commit/f49d42880f2aad1e23daaf5930fb66ec359a11a2#diff-821927f099d6d61ff6b9fc149d7bc071R289 | |
-- Availability: 2.3.0 | |
CREATE OR REPLACE FUNCTION contains_2d(box2df, geometry) | |
RETURNS boolean | |
AS '/usr/lib/postgresql/9.6/lib/postgis-2.4.so','gserialized_contains_box2df_geom_2d' | |
LANGUAGE 'c' IMMUTABLE STRICT; | |
-- Availability: 2.3.0 | |
CREATE OR REPLACE FUNCTION is_contained_2d(box2df, geometry) |
# Start stock xenial | |
docker run -it ubuntu:xenial bash | |
# Prepare image | |
apt-get update -y \ | |
&& apt-get install -y vim software-properties-common wget apt-transport-https | |
add-apt-repository -y "deb https://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" \ | |
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - |
import boto3 | |
resource = boto3.resource( | |
's3', | |
aws_access_key_id = 'my_access_key', | |
aws_secret_access_key = 'my_secret_key', | |
endpoint_url = 'http://s3.target.endpoint.minio-compatible.com', | |
) | |
bucket = resource.Bucket('my_test_bucket') |
/* | |
* Compute permutations of +r+ elements of the set <code>[0..n-1]</code>. | |
* | |
* When we have a complete permutation of array indices, copy the values | |
* at those indices into a new array and yield that array. | |
* | |
* n: the size of the set | |
* r: the number of elements in each permutation | |
* p: the array (of size r) that we're filling in | |
* used: an array of booleans: whether a given index is already used |
Thanks again for applying to the Infrastructure Engineer job at GitHub! The purpose of this gist is to get a better sense of your technical skills and overall communication style. Take as much time as you need to answer these questions.
Engineers at GitHub communicate primarily in written form, via GitHub Issues and Pull Requests. We expect our engineers to communicate clearly and effectively; they should be able to concisely express both their ideas as well as complex technological concepts.
Please answer the following questions in as much detail as you feel comfortable with. The questions are purposefully open-ended, and we hope you take the opportunity to show us your familiarity with various technologies, tools, and techniques. Limit each answer to half a page if possible; walls of text are not required, and you'll have a chance to discuss your answers in further detail during a phone interview if we move forward in the process. Finally, feel
// License: MIT | |
package main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"math/big" | |
) | |
// GenerateRandomASCIIString returns a securely generated random ASCII string. |