Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f1a27b

Browse files
committed
Add info about recent changes into README.md
1 parenta5ed3cd commit6f1a27b

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

‎README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ postgres=# CREATE EXTENSION ptrack;
5757

5858
##Configuration
5959

60-
The only one configurable option is`ptrack.map_size` (in MB). Default is`-1`, which means`ptrack` is turned off.To completely avoidfalse positives it is recommended to set`ptrack.map_size` to`1 / 1000` of expected`PGDATA` size (i.e.`1000` for a 1 TB database), since a single 8 byte`ptrack` map record tracks changes in a standard 8 KB PostgreSQL page.
60+
The only one configurable option is`ptrack.map_size` (in MB). Default is`-1`, which means`ptrack` is turned off.In order to reduce number offalse positives it is recommended to set`ptrack.map_size` to`1 / 1000` of expected`PGDATA` size (i.e.`1000` for a 1 TB database).
6161

6262
To disable`ptrack` and clean up all remaining service files set`ptrack.map_size` to`0`.
6363

6464
##Public SQL API
6565

6666
* ptrack_version() — returns ptrack version string.
6767
* ptrack_init_lsn() — returns LSN of the last ptrack map initialization.
68-
* ptrack_get_pagemapset(start_lsn pg_lsn) — returns a set of changed data files withbitmapsof changed blocks since specified`start_lsn`.
68+
* ptrack_get_pagemapset(start_lsn pg_lsn) — returns a set of changed data files witha numberof changed blocks and their bitmaps since specified`start_lsn`.
6969
* ptrack_get_change_stat(start_lsn pg_lsn) — returns statistic of changes (number of files, pages and size in MB) since specified`start_lsn`.
7070

7171
Usage example:
@@ -74,7 +74,7 @@ Usage example:
7474
postgres=# SELECT ptrack_version();
7575
ptrack_version
7676
----------------
77-
2.1
77+
2.2
7878
(1 row)
7979

8080
postgres=# SELECT ptrack_init_lsn();
@@ -83,13 +83,21 @@ postgres=# SELECT ptrack_init_lsn();
8383
0/1814408
8484
(1 row)
8585

86-
postgres=# SELECT ptrack_get_pagemapset('0/186F4C8');
87-
ptrack_get_pagemapset
88-
-------------------------------------------
89-
(global/1262,"\\x0100000000000000000000")
90-
(global/2672,"\\x0200000000000000000000")
91-
(global/2671,"\\x0200000000000000000000")
92-
(3 rows)
86+
postgres=# SELECT * FROM ptrack_get_pagemapset('0/185C8C0');
87+
path | pagecount | pagemap
88+
---------------------+-----------+----------------------------------------
89+
base/16384/1255 |3 | \x001000000005000000000000
90+
base/16384/2674 |3 | \x0000000900010000000000000000
91+
base/16384/2691 |1 | \x00004000000000000000000000
92+
base/16384/2608 |1 | \x000000000000000400000000000000000000
93+
base/16384/2690 |1 | \x000400000000000000000000
94+
(5 rows)
95+
96+
postgres=# SELECT * FROM ptrack_get_change_stat('0/285C8C8');
97+
files | pages | size, MB
98+
-------+-------+------------------------
99+
20 |25 |0.19531250000000000000
100+
(1 row)
93101
```
94102

95103
##Upgrading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp