This gist summarises a way to simulate point-in-time recovery (PITR) using WAL-G. Most of the material is adapted from Creston's tutorial.
First we initialize a database cluster
pg_ctl init -D cluster
// Must disable logging if using logging in main.cpp or in other custom components for the | |
// __c causes a section type conflict with __c thingy | |
// you can enable logging and use it if you enable this in logger: | |
/* | |
logger: | |
level: DEBUG | |
esp8266_store_log_strings_in_flash: False | |
*/ | |
//#define APE_LOGGING |
kubectl get pods --all-namespaces --sort-by='.metadata.name' -o jsonpath='{.items[*].spec.containers[*].resources.limits.memory}' | |
kubectl get pod --all-namespaces --sort-by='.metadata.name' -o json | jq -r '[.items[] | {pod_name: .metadata.name, containers: .spec.containers[] | [ {container_name: .name, memory_requested: .resources.requests.memory, cpu_requested: .resources.requests.cpu} ] }]' |
This gist summarises a way to simulate point-in-time recovery (PITR) using WAL-G. Most of the material is adapted from Creston's tutorial.
First we initialize a database cluster
pg_ctl init -D cluster
#!/bin/bash | |
set -eux | |
set -o pipefail | |
cd /tmp | |
git clone https://robot:[email protected]/vadim/cluster-state.git | |
cd cluster-state | |
rm -rf ./* | |
# Globals |
@mixin lhCrop($line-height) { | |
&::before { | |
content: ''; | |
display: block; | |
height: 0; | |
width: 0; | |
margin-top: calc((1 - #{$line-height}) * 0.5em); | |
} | |
} |
set role api; set session app.current_user_id to 1; select * from app_users; | |
id | first_name | |
----+------------ | |
1 | john | |
2 | max | |
set role api; set session app.current_user_id to 2; select * from app_users; | |
id | first_name |
// Based on https://github.com/facebook/relay/blob/master/packages/react-relay/modern/ReactRelayQueryRenderer.js | |
/** | |
* Copyright (c) 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* |
#include "CircleRenderer.h" | |
#include "Types.h" | |
#include <Magnum/Mesh.h> | |
#include <Magnum/Buffer.h> | |
#include <Magnum/SceneGraph/Camera.h> | |
#include <Magnum/Shaders/Flat.h> | |
#include <Magnum/Primitives/Circle.h> | |
#include <Magnum/Trade/MeshData2D.h> |
-- array_agg не поддерживает массивы | |
create aggregate array_agg_mult(anyarray) ( | |
SFUNC = array_cat, | |
STYPE = anyarray, | |
INITCOND = '{}' | |
); |
#!/bin/bash | |
ADDR=$1 | |
echo $ADDR | |
firewall-cmd --permanent --zone=drop --add-rich-rule=" | |
rule family='ipv4' | |
source address=${ADDR} | |
port protocol='tcp' port='2377' accept" |