Skip to content

Commit c137785

Browse files
author
Alexander Korotkov
committed
Merge branch 'PGPROEE9_6' of git.postgrespro.ru:pgpro-dev/postgrespro into PGPROEE9_6
2 parents 9240a60 + 1c065f7 commit c137785

File tree

13 files changed

+294
-177
lines changed

13 files changed

+294
-177
lines changed

contrib/Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SUBDIRS = \
3636
pg_query_state \
3737
pg_standby \
3838
pg_stat_statements \
39-
pg_transfer \
39+
pg_transfer \
4040
pg_trgm \
4141
pgcrypto \
4242
pgrowlocks \
@@ -65,12 +65,11 @@ SUBDIRS = \
6565
pg_probackup \
6666
pg_pathman \
6767
shared_ispell \
68-
vacuumlo \
6968
pg_hint_plan \
70-
fulleq \
71-
fasttrun \
72-
online_analyze \
73-
plantuner
69+
fulleq \
70+
fasttrun \
71+
online_analyze \
72+
plantuner
7473

7574
ifeq ($(with_openssl),yes)
7675
SUBDIRS += sslinfo

doc/src/sgml/cfs.sgml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
<para>
77
This chapter explains page level compression and encryption in
8-
<productname>PostgreSQL</> database system.
8+
<productname>&productname;</> database system.
99
</para>
1010

1111
<sect1 id="cfs-overview">
1212
<title>Why database compression/encryption may be useful</title>
1313

1414
<para>
1515
Databases are used to store larger number of text and duplicated information. This is why compression of most of databases
16-
can be quite efficient and reduce used storage size 3..5 times. PostgreSQL performs compression of TOAST data, but small
16+
can be quite efficient and reduce used storage size 3..5 times. &productname; performs compression of TOAST data, but small
1717
text fields which fits in the page are not compressed. Also not only heap pages can be compressed, indexes on text keys
1818
or indexes with larger number of duplicate values are also good candidates for compression.
1919
</para>
2020

2121
<para>
22-
PostgreSQL is working with disk data through buffer pool which accumulates most frequently used buffers.
22+
&productname; is working with disk data through buffer pool which accumulates most frequently used buffers.
2323
Interface between buffer manager and file system is the most natural place for performing compression.
2424
Buffers are stored on the disk in compressed form for reducing disk usage and minimizing amount of data to be read.
2525
And in-memory buffer pool contains uncompressed buffers, providing access to the records at the same speed as without
@@ -49,19 +49,19 @@
4949
<listitem>
5050
<para>
5151
When modified buffers are flushed from buffer pool to the disk, they are written to the random locations
52-
on the disk. PostgreSQL cache replacement algorithm makes a decision about throwing away buffer from the pool
52+
on the disk. &productname; cache replacement algorithm makes a decision about throwing away buffer from the pool
5353
based on its access frequency and ignoring its location on the disk. So two subsequently written buffers can be
5454
located in completely different parts of the disk. For HDD seek time is quite large - about 10msec, which corresponds
5555
to 100 random writes per second. And speed of sequential write can be about 100Mb/sec, which corresponds to
5656
10000 buffers per second (100 times faster). For SSD gap between sequential and random write speed is smaller,
5757
but still sequential writers are more efficient. How it relates to data compression?
58-
Size of buffer in PostgreSQL is fixed (8kb by default). Size of compressed buffer depends on the content of the buffer.
58+
Size of buffer in &productname; is fixed (8kb by default). Size of compressed buffer depends on the content of the buffer.
5959
So updated buffer can not always fit in its old location on the disk. This is why we can not access pages directly
6060
by its address. Instead of it we have to use map which translates logical address of the page to its physical location
6161
on the disk. Definitely this extra level of indirection adds overhead. But in most cases this map can fit in memory,
6262
so page lookup is nothing more than just accessing array element. But presence of this map also have positive effect:
6363
we can now write updated pages sequentially, just updating their map entries.
64-
PostgreSQL is doing much to avoid "write storm" intensive flushing of data to the disk when buffer pool space is
64+
&productname; is doing much to avoid "write storm" intensive flushing of data to the disk when buffer pool space is
6565
exhausted. Compression allows to significantly reduce disk load.
6666
</para>
6767
</listitem>
@@ -72,7 +72,7 @@
7272
Another useful feature which can be combined with compression is database encryption.
7373
Encryption allows to protected you database from unintended access (if somebody stole your notebook, hard drive or make
7474
copy from it, thief will not be able to extract information from your database if it is encrypted).
75-
PostgreSQL provide contrib module pgcrypto, allowing you to encrypt some particular types/columns.
75+
&productname; provide contrib module pgcrypto, allowing you to encrypt some particular types/columns.
7676

7777
But safer and convenient way is to encrypt all data in the database. Encryption can be combined with compression.
7878
Data should be stored at disk in encrypted form and decrypted when page is loaded in buffer pool.
@@ -81,7 +81,7 @@
8181
</para>
8282

8383
<para>
84-
Why do we need to perform compression/encryption in PostgreSQL and do not use correspondent features of underlying file
84+
Why do we need to perform compression/encryption in &productname; and do not use correspondent features of underlying file
8585
systems? First answer is that there are not so much file system supporting compression and encryption for all OSes.
8686
And even if such file systems are available, it is not always possible/convenient to install such file system just
8787
to compress/protect your database. Second question is that performing compression at database level can be more efficient,
@@ -91,10 +91,10 @@
9191
</sect1>
9292

9393
<sect1 id="cfs-implementation">
94-
<title>How compression/encryption are integrated in PostgreSQL</title>
94+
<title>How compression/encryption are integrated in &productname;</title>
9595

9696
<para>
97-
To improve efficiency of disk IO, PostgreSQL is working with files through buffer manager, which pins in memory
97+
To improve efficiency of disk IO, &productname; is working with files through buffer manager, which pins in memory
9898
most frequently used pages. Each page is fixed size (8kb by default). But if we compress page, then
9999
its size will depend on its content. So updated page can require more (or less) space than original page.
100100
So we may not always perform in-place update of the page. Instead of it we have to locate new space for the page and somehow release
@@ -137,7 +137,7 @@
137137
</para>
138138

139139
<para>
140-
PostgreSQL stores relation in a set of files, size of each file is not exceeding 2Gb. Separate page map is constructed for each file.
140+
&productname; stores relation in a set of files, size of each file is not exceeding 2Gb. Separate page map is constructed for each file.
141141
Garbage collection in CFS is done by several background workers. Number of this workers and pauses in their work can be
142142
configured by database administrator. These workers are splitting work based on inode hash, so them do not conflict with each other.
143143
Each file is proceeded separately. The files is blocked for access at the time of garbage collection but complete relation is not
@@ -150,9 +150,9 @@
150150
</para>
151151

152152
<para>
153-
CFS can be build with several compression libraries: PostgreSQL lz, zlib, lz4, snappy, lzfse...
153+
CFS can be build with several compression libraries: &productname; lz, zlib, lz4, snappy, lzfse...
154154
But this is build time choice: it is not possible now to dynamically choose compression algorithm.
155-
CFS stores information about the compression algorithm used in a tablespace and produces error if PostgreSQL is built with different
155+
CFS stores information about the compression algorithm used in a tablespace and produces error if &productname; is built with different
156156
library.
157157
</para>
158158

doc/src/sgml/jsquery.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<title>Installation</title>
5353
<para>
5454
When you installed <productname>Postgres Pro</productname> distribution, jsquery is available
55-
as a contrib moudle. Install contrib modules (postgrespro-contrib
55+
as a contrib module. Install contrib modules (postgrespro-contrib
5656
package in the binary distribution for Linux, or make -C contrib
5757
install if you are building from source), then start psql shell
5858
and type

doc/src/sgml/mchar.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
It implements types MCHAR and MVARCHAR, which are bug-to-bug
1616
compatible with MSSQL CHAR and VARCHAR respectively. Additionaly,
1717
these types use libicu for comparation and case conversion, so their
18-
behavoir is identical across different operating system.
18+
behavior is identical across different operating system.
1919
</para>
2020
<para>
21-
PostgresPro also includes <xref linkend="citext"> extension which
21+
Postgres Pro also includes <xref linkend="citext"> extension which
2222
provides types similar to MCHAR. But this extension doesn't emulate
23-
MS-SQL behavoir concerning end-of-value whitespace.
23+
MS-SQL behavior concerning end-of-value whitespace.
2424
</para>
2525
<para>
26-
Differences from PostgreSQL standard CHAR and VARCHAR are:
26+
Differences from &productname; standard CHAR and VARCHAR are:
2727
</para>
2828
<itemizedlist>
2929
<listitem>

0 commit comments

Comments
 (0)