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

Commitf255954

Browse files
committed
Merge branch 'PGPRO9_6' into PGPROEE9_6
Conflicts:doc/src/sgml/pgprobackup.sgml
2 parentsae50ef1 +97d3291 commitf255954

File tree

48 files changed

+632
-353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+632
-353
lines changed

‎contrib/bloom/blinsert.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,18 @@ blbuildempty(Relation index)
164164
metapage= (Page)palloc(BLCKSZ);
165165
BloomFillMetapage(index,metapage);
166166

167-
/* Write the page. If archiving/streaming, XLOG it. */
167+
/*
168+
* Write the page and log it. It might seem that an immediate sync
169+
* would be sufficient to guarantee that the file exists on disk, but
170+
* recovery itself might remove it while replaying, for example, an
171+
* XLOG_DBASE_CREATE or XLOG_TBLSPC_CREATE record. Therefore, we
172+
* need this even when wal_level=minimal.
173+
*/
168174
PageSetChecksumInplace(metapage,BLOOM_METAPAGE_BLKNO);
169175
smgrwrite(index->rd_smgr,INIT_FORKNUM,BLOOM_METAPAGE_BLKNO,
170176
(char*)metapage, true);
171-
if (XLogIsNeeded())
172-
log_newpage(&index->rd_smgr->smgr_rnode.node,INIT_FORKNUM,
173-
BLOOM_METAPAGE_BLKNO,metapage, false);
177+
log_newpage(&index->rd_smgr->smgr_rnode.node,INIT_FORKNUM,
178+
BLOOM_METAPAGE_BLKNO,metapage, false);
174179

175180
/*
176181
* An immediate sync is required even if we xlog'd the page, because the

‎contrib/pg_probackup/backup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void pg_start_backup(const char *label, bool smooth, pgBackup *backup);
6464
staticvoidpg_stop_backup(pgBackup*backup);
6565
staticboolpg_is_standby(void);
6666
staticvoidget_lsn(PGconn*conn,PGresult*res,XLogRecPtr*lsn,boolstop_backup);
67-
staticvoidget_xid(PGresult*res,uint32*xid);
67+
staticvoidget_xid(PGresult*res,TransactionId*xid);
6868
staticvoidpg_ptrack_clear(void);
6969
staticboolpg_ptrack_support(void);
7070
staticboolpg_ptrack_enable(void);
@@ -1042,14 +1042,14 @@ get_lsn(PGconn *conn, PGresult *res, XLogRecPtr *lsn, bool stop_backup)
10421042
* Get XID from result of txid_current() after pg_stop_backup().
10431043
*/
10441044
staticvoid
1045-
get_xid(PGresult*res,uint32*xid)
1045+
get_xid(PGresult*res,TransactionId*xid)
10461046
{
10471047
if (res==NULL||PQntuples(res)!=1||PQnfields(res)!=1)
10481048
elog(ERROR,
10491049
"result of txid_current() is invalid: %s",
10501050
PQerrorMessage(connection));
10511051

1052-
if (sscanf(PQgetvalue(res,0,0),"%u",xid)!=1)
1052+
if (sscanf(PQgetvalue(res,0,0),XID_FMT,xid)!=1)
10531053
{
10541054
elog(ERROR,
10551055
"result of txid_current() is invalid: %s",

‎contrib/pg_probackup/catalog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ catalog_read_ini(const char *path)
337337
{'s',0,"stop-lsn",NULL,SOURCE_ENV },
338338
{'t',0,"start-time",NULL,SOURCE_ENV },
339339
{'t',0,"end-time",NULL,SOURCE_ENV },
340-
{'u',0,"recovery-xid",NULL,SOURCE_ENV },
340+
{'U',0,"recovery-xid",NULL,SOURCE_ENV },
341341
{'t',0,"recovery-time",NULL,SOURCE_ENV },
342342
{'I',0,"data-bytes",NULL,SOURCE_ENV },
343343
{'u',0,"block-size",NULL,SOURCE_ENV },

‎contrib/pg_probackup/pg_probackup.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
#defineDIR_PERMISSION(0700)
4646
#defineFILE_PERMISSION(0600)
4747

48+
#ifndefPGPRO_EE
49+
#defineXID_FMT "%u"
50+
#endif
51+
4852
/* backup mode file */
4953
typedefstructpgFile
5054
{
@@ -119,7 +123,7 @@ typedef struct pgBackup
119123
time_tstart_time;
120124
time_tend_time;
121125
time_trecovery_time;
122-
uint32recovery_xid;
126+
TransactionIdrecovery_xid;
123127

124128
/* Different sizes (-1 means nothing was backed up) */
125129
/*
@@ -159,7 +163,7 @@ typedef struct pgRecoveryTarget
159163
booltime_specified;
160164
time_trecovery_target_time;
161165
boolxid_specified;
162-
unsignedintrecovery_target_xid;
166+
TransactionIdrecovery_target_xid;
163167
boolrecovery_target_inclusive;
164168
}pgRecoveryTarget;
165169

‎contrib/pg_probackup/restore.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ checkIfCreateRecoveryConf(const char *target_time,
775775
constchar*target_inclusive)
776776
{
777777
time_tdummy_time;
778-
unsignedintdummy_xid;
778+
TransactionIddummy_xid;
779779
booldummy_bool;
780780
pgRecoveryTarget*rt;
781781

@@ -798,7 +798,11 @@ checkIfCreateRecoveryConf(const char *target_time,
798798
if (target_xid)
799799
{
800800
rt->xid_specified= true;
801-
if (parse_uint32(target_xid,&dummy_xid))
801+
#ifdefPGPRO_EE
802+
if (parse_uint64(target_xid,&dummy_xid))
803+
#else
804+
if (parse_uint32(target_xid,&dummy_xid))
805+
#endif
802806
rt->recovery_target_xid=dummy_xid;
803807
else
804808
elog(ERROR,"cannot create recovery.conf with %s",target_xid);

‎doc/src/sgml/func.sgml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,11 +1534,12 @@
15341534
</entry>
15351535
<entry><type>text</type></entry>
15361536
<entry>
1537-
Remove the longest string containing onlythe
1537+
Remove the longest string containing onlycharacters from
15381538
<parameter>characters</parameter> (a space by default) from the
1539-
start/end/both ends of the <parameter>string</parameter>
1539+
start, end, or both ends (<literal>both</> is the default)
1540+
of <parameter>string</parameter>
15401541
</entry>
1541-
<entry><literal>trim(both 'x' from 'xTomxx')</literal></entry>
1542+
<entry><literal>trim(both 'xyz' from 'yxTomxx')</literal></entry>
15421543
<entry><literal>Tom</literal></entry>
15431544
</row>
15441545

@@ -1547,14 +1548,14 @@
15471548
<literal><function>trim(<optional>leading | trailing
15481549
| both</optional> <optional>from</optional>
15491550
<parameter>string</parameter>
1550-
<optional><parameter>,characters</parameter></optional>
1551+
<optional>,<parameter>characters</parameter></optional>
15511552
)</function></literal>
15521553
</entry>
15531554
<entry><type>text</type></entry>
15541555
<entry>
1555-
Non-standardversion of <function>trim()</>
1556+
Non-standardsyntax for <function>trim()</>
15561557
</entry>
1557-
<entry><literal>trim(both from 'xTomxx', 'x')</literal></entry>
1558+
<entry><literal>trim(both from 'yxTomxx', 'xyz')</literal></entry>
15581559
<entry><literal>Tom</literal></entry>
15591560
</row>
15601561

@@ -1626,7 +1627,7 @@
16261627
in <parameter>characters</parameter> (a space by default)
16271628
from the start and end of <parameter>string</parameter>
16281629
</entry>
1629-
<entry><literal>btrim('xyxtrimyyx', 'xy')</literal></entry>
1630+
<entry><literal>btrim('xyxtrimyyx', 'xyz')</literal></entry>
16301631
<entry><literal>trim</literal></entry>
16311632
</row>
16321633

@@ -1895,8 +1896,8 @@
18951896
<parameter>characters</parameter> (a space by default) from the start of
18961897
<parameter>string</parameter>
18971898
</entry>
1898-
<entry><literal>ltrim('zzzytrim', 'xyz')</literal></entry>
1899-
<entry><literal>trim</literal></entry>
1899+
<entry><literal>ltrim('zzzytest', 'xyz')</literal></entry>
1900+
<entry><literal>test</literal></entry>
19001901
</row>
19011902

19021903
<row>
@@ -2201,8 +2202,8 @@
22012202
<parameter>characters</parameter> (a space by default) from the end of
22022203
<parameter>string</parameter>
22032204
</entry>
2204-
<entry><literal>rtrim('trimxxxx', 'x')</literal></entry>
2205-
<entry><literal>trim</literal></entry>
2205+
<entry><literal>rtrim('testxxzx', 'xyz')</literal></entry>
2206+
<entry><literal>test</literal></entry>
22062207
</row>
22072208

22082209
<row>
@@ -3467,11 +3468,11 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
34673468
</entry>
34683469
<entry><type>bytea</type></entry>
34693470
<entry>
3470-
Remove the longest string containing onlythebytes in
3471+
Remove the longest string containing only bytes appearing in
34713472
<parameter>bytes</parameter> from the start
34723473
and end of <parameter>string</parameter>
34733474
</entry>
3474-
<entry><literal>trim(E'\\000'::bytea from E'\\000Tom\\000'::bytea)</literal></entry>
3475+
<entry><literal>trim(E'\\000\\001'::bytea from E'\\000Tom\\001'::bytea)</literal></entry>
34753476
<entry><literal>Tom</literal></entry>
34763477
</row>
34773478
</tbody>
@@ -3510,11 +3511,11 @@ SELECT format('Testing %3$s, %2$s, %s', 'one', 'two', 'three');
35103511
</entry>
35113512
<entry><type>bytea</type></entry>
35123513
<entry>
3513-
Remove the longest stringconsisting onlyofbytes
3514-
in<parameter>bytes</parameter> from the start and end of
3514+
Remove the longest stringcontaining only bytes appearing in
3515+
<parameter>bytes</parameter> from the start and end of
35153516
<parameter>string</parameter>
35163517
</entry>
3517-
<entry><literal>btrim(E'\\000trim\\000'::bytea, E'\\000'::bytea)</literal></entry>
3518+
<entry><literal>btrim(E'\\000trim\\001'::bytea, E'\\000\\001'::bytea)</literal></entry>
35183519
<entry><literal>trim</literal></entry>
35193520
</row>
35203521

‎doc/src/sgml/parallel.sgml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,15 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
218218
</para>
219219
</listitem>
220220

221+
<listitem>
222+
<para>
223+
A prepared statement is executed using a <literal>CREATE TABLE .. AS
224+
EXECUTE ..</literal> statement. This construct converts what otherwise
225+
would have been a read-only operation into a read-write operation,
226+
making it ineligible for parallel query.
227+
</para>
228+
</listitem>
229+
221230
<listitem>
222231
<para>
223232
The transaction isolation level is serializable. This situation
@@ -240,7 +249,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
240249
copy of the output result set, so the query would not run any faster
241250
than normal but would produce incorrect results. Instead, the parallel
242251
portion of the plan must be what is known internally to the query
243-
optimizer as a <firstterm>partial plan</>; that is, it must constructed
252+
optimizer as a <firstterm>partial plan</>; that is, it mustbeconstructed
244253
so that each process which executes the plan will generate only a
245254
subset of the output rows in such a way that each required output row
246255
is guaranteed to be generated by exactly one of the cooperating processes.

‎doc/src/sgml/pgprobackup.sgml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,9 @@ pg_probackup restore -j 4
11491149
<listitem>
11501150
<para>
11511151
Only full backups are supported when using
1152-
<ulink url="https://postgrespro.com/docs/postgresproee/current/cfs.html">compressed tablespaces</ulink>
1152+
<ulink
1153+
url="https://postgrespro.com/docs/postgresproee/current/cfs.html">compressed
1154+
tablespaces</ulink>
11531155
(<productname>Postgres Pro Enterprise</productname> feature).
11541156
</para>
11551157
</listitem>

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,11 @@ doc/src/sgml/ref/pg_dump.sgml
138138
<para>
139139
Include large objects in the dump. This is the default behavior
140140
except when <option>--schema</>, <option>--table</>, or
141-
<option>--schema-only</> is specified, so the <option>-b</>
142-
switch is only useful to add large objects to selective dumps.
141+
<option>--schema-only</> is specified. The <option>-b</>
142+
switch is therefore only useful to add large objects to dumps
143+
where a specific schema or table has been requested. Note that
144+
blobs are considered data and therefore will be included when
145+
--data-only is used, but not when --schema-only is.
143146
</para>
144147
</listitem>
145148
</varlistentry>

‎doc/src/sgml/ref/psql-ref.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3798,8 +3798,9 @@ $endif
37983798
If the query results do not fit on the screen, they are piped
37993799
through this command. Typical values are
38003800
<literal>more</literal> or <literal>less</literal>. The default
3801-
is platform-dependent. The use of the pager can be disabled by
3802-
using the <command>\pset</command> command.
3801+
is platform-dependent. Use of the pager can be disabled by setting
3802+
<envar>PAGER</envar> to empty, or by using pager-related options of
3803+
the <command>\pset</command> command.
38033804
</para>
38043805
</listitem>
38053806
</varlistentry>
@@ -4170,7 +4171,7 @@ second | four
41704171
with the <command>\crosstabview</command> command:
41714172
<programlisting>
41724173
testdb=&gt; <userinput>SELECT first, second, first &gt; 2 AS gt2 FROM my_table;</userinput>
4173-
first | second |ge2
4174+
first | second |gt2
41744175
-------+--------+-----
41754176
1 | one | f
41764177
2 | two | f

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp