mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Rough script to add tables to the user guide for performance tests.
This really needs to be worked on but for now at least preserve to code to be improved later.
This commit is contained in:
parent
10b4b9af87
commit
d242114dc0
@ -221,6 +221,26 @@
|
||||
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-centos6]}">service postgresql-{[pg-version-upgrade]} status</variable>
|
||||
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-centos7]}">systemctl status postgresql-{[pg-version-upgrade]}.service</variable>
|
||||
|
||||
<!-- Add more tables to make the backup more interesting. This is a rough and ready solution that can be pasted into the
|
||||
document where needed to grow the number of files as needed for performance testing. -->
|
||||
<!-- <execute user="postgres" show="n">
|
||||
<exe-cmd>psql -c "
|
||||
create or replace function create_test_table(prefix int, scale int) returns void as \$\$
|
||||
declare
|
||||
index int;
|
||||
begin
|
||||
for index in 1 .. scale loop
|
||||
execute 'create table test_' || prefix || '_' || index || ' (id int)';
|
||||
end loop;
|
||||
end \$\$ LANGUAGE plpgsql;"</exe-cmd>
|
||||
</execute>
|
||||
|
||||
<execute user="postgres" show="n">
|
||||
<exe-cmd>
|
||||
bash -c 'for i in {1..100}; do psql -c "select create_test_table(${i?}, 1000)"; done'
|
||||
</exe-cmd>
|
||||
</execute> -->
|
||||
|
||||
<!-- Common commands -->
|
||||
<variable key="ssh-key-install">
|
||||
mkdir -p -m 700 /root/.ssh && \
|
||||
|
Loading…
Reference in New Issue
Block a user