Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix postgres archiver doc and change proxyRef -> databaseRef for Proxysql Autoscaler #659

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions docs/guides/postgres/pitr/archiver.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ spec:
scheduler:
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
schedule: "/30 * * * *"
schedule: "30 * * * *"
sessionHistoryLimit: 2
manifestBackup:
scheduler:
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
schedule: "/30 * * * *"
schedule: "30 * * * *"
sessionHistoryLimit: 2
backupStorage:
ref:
Expand Down Expand Up @@ -288,16 +288,21 @@ hi=# create table tab_1 (a int);
CREATE TABLE
hi=# insert into tab_1 values(generate_series(1,100));
INSERT 0 100
hi=# select pg_switch_wal();
0/504A0D8
(1 row)

# we will restore here. till now we have 100 rows
hi=# select now();
2023-12-12 13:43:41.300216+00

# This insert is necessary unless postgres will wait
# for data to be available at `2023-12-12 13:43:41.300216+00`
# regardless of our switch wal operation
hi=# insert into tab_1 values(generate_series(1,100));
INSERT 0 100

hi=# select now();
2023-12-12 13:43:41.300216+00

# switching wall so that this wal is available when we restore
# in general this will be archived when either of them occurs
# - archive_timeout passed
# - wal file gets full by wal record
hi=# select pg_switch_wal();
0/6013240

Expand Down Expand Up @@ -325,7 +330,7 @@ LINE 1: select count(*) from tab_1 ;
We can't restore from a full backup since at this point no full backup was perform. so we can choose a specific time in which time we want to restore.We can get the specfice time from the wal that archived in the backup storage . Go to the binlog file and find where to store. You can parse wal-files using `pg-waldump`.


For the demo I will use the previous time we get form `select now()`
For the demo I will use the previous time we got from `select now()`

```bash
hi=# select now();
Expand Down Expand Up @@ -399,7 +404,7 @@ bash-5.1$ psql
postgres=# \c hi

hi=# select count(*) from tab_1 ;
200
100
```

**so we are able to successfully recover from a disaster**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: proxy-as-compute
namespace: demo
spec:
proxyRef:
databaseRef:
name: proxy-server
opsRequestOptions:
timeout: 3m
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/proxysql/autoscaler/compute/cluster/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ metadata:
name: proxy-as-compute
namespace: demo
spec:
proxyRef:
databaseRef:
name: proxy-server
opsRequestOptions:
timeout: 3m
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/proxysql/concepts/autoscaler/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ metadata:
name: psops-autoscale
namespace: demo
spec:
proxyRef:
databaseRef:
name: sample-proxysql
compute:
proxysql:
Expand Down Expand Up @@ -73,4 +73,4 @@ All of them has the following sub-fields:
- `containerControlledValues` specifies which resource values should be controlled. Allowed values are "RequestsAndLimits" and "RequestsOnly".
- `resourceDiffPercentage` specifies the minimum resource difference between recommended value and the current value in percentage. If the difference percentage is greater than this value than autoscaling will be triggered.
- `podLifeTimeThreshold` specifies the minimum pod lifetime of at least one of the pods before triggering autoscaling.
- `InMemoryScalingThreshold` the percentage of the Memory that will be passed as inMemorySizeGB for inmemory database engine, which is only available for the percona variant of the proxysql.
- `InMemoryScalingThreshold` the percentage of the Memory that will be passed as inMemorySizeGB for inmemory database engine, which is only available for the percona variant of the proxysql.
Loading