Skip to content

Commit 3987295

Browse files
committed
Merge branch 'REL9_6_STABLE' into PGPRO9_6
2 parents 48404a1 + 2802b02 commit 3987295

File tree

135 files changed

+952
-874
lines changed

Some content is hidden

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

135 files changed

+952
-874
lines changed

contrib/bloom/blinsert.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
130130
initBloomState(&buildstate.blstate, index);
131131
buildstate.tmpCtx = AllocSetContextCreate(CurrentMemoryContext,
132132
"Bloom build temporary context",
133-
ALLOCSET_DEFAULT_MINSIZE,
134-
ALLOCSET_DEFAULT_INITSIZE,
135-
ALLOCSET_DEFAULT_MAXSIZE);
133+
ALLOCSET_DEFAULT_SIZES);
136134
initCachedPage(&buildstate);
137135

138136
/* Do the heap scan */
@@ -204,9 +202,7 @@ blinsert(Relation index, Datum *values, bool *isnull,
204202

205203
insertCtx = AllocSetContextCreate(CurrentMemoryContext,
206204
"Bloom insert temporary context",
207-
ALLOCSET_DEFAULT_MINSIZE,
208-
ALLOCSET_DEFAULT_INITSIZE,
209-
ALLOCSET_DEFAULT_MAXSIZE);
205+
ALLOCSET_DEFAULT_SIZES);
210206

211207
oldCtx = MemoryContextSwitchTo(insertCtx);
212208

contrib/dblink/dblink.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -980,9 +980,7 @@ materializeQueryResult(FunctionCallInfo fcinfo,
980980
/* Create short-lived memory context for data conversions */
981981
sinfo.tmpcontext = AllocSetContextCreate(CurrentMemoryContext,
982982
"dblink temporary context",
983-
ALLOCSET_DEFAULT_MINSIZE,
984-
ALLOCSET_DEFAULT_INITSIZE,
985-
ALLOCSET_DEFAULT_MAXSIZE);
983+
ALLOCSET_DEFAULT_SIZES);
986984

987985
/* execute query, collecting any tuples into the tuplestore */
988986
res = storeQueryResult(&sinfo, conn, sql);

contrib/file_fdw/file_fdw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,9 +1061,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
10611061
*/
10621062
tupcontext = AllocSetContextCreate(CurrentMemoryContext,
10631063
"file_fdw temporary context",
1064-
ALLOCSET_DEFAULT_MINSIZE,
1065-
ALLOCSET_DEFAULT_INITSIZE,
1066-
ALLOCSET_DEFAULT_MAXSIZE);
1064+
ALLOCSET_DEFAULT_SIZES);
10671065

10681066
/* Prepare for sampling rows */
10691067
reservoir_init_selection_state(&rstate, targrows);

contrib/pg_trgm/trgm_regexp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,7 @@ createTrgmNFA(text *text_re, Oid collation,
529529
*/
530530
tmpcontext = AllocSetContextCreate(CurrentMemoryContext,
531531
"createTrgmNFA temporary context",
532-
ALLOCSET_DEFAULT_MINSIZE,
533-
ALLOCSET_DEFAULT_INITSIZE,
534-
ALLOCSET_DEFAULT_MAXSIZE);
532+
ALLOCSET_DEFAULT_SIZES);
535533
oldcontext = MemoryContextSwitchTo(tmpcontext);
536534

537535
/*

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,14 +1315,10 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
13151315
/* Create contexts for batches of tuples and per-tuple temp workspace. */
13161316
fsstate->batch_cxt = AllocSetContextCreate(estate->es_query_cxt,
13171317
"postgres_fdw tuple data",
1318-
ALLOCSET_DEFAULT_MINSIZE,
1319-
ALLOCSET_DEFAULT_INITSIZE,
1320-
ALLOCSET_DEFAULT_MAXSIZE);
1318+
ALLOCSET_DEFAULT_SIZES);
13211319
fsstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt,
13221320
"postgres_fdw temporary data",
1323-
ALLOCSET_SMALL_MINSIZE,
1324-
ALLOCSET_SMALL_INITSIZE,
1325-
ALLOCSET_SMALL_MAXSIZE);
1321+
ALLOCSET_SMALL_SIZES);
13261322

13271323
/*
13281324
* Get info we'll need for converting data fetched from the foreign server
@@ -1695,9 +1691,7 @@ postgresBeginForeignModify(ModifyTableState *mtstate,
16951691
/* Create context for per-tuple temp workspace. */
16961692
fmstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt,
16971693
"postgres_fdw temporary data",
1698-
ALLOCSET_SMALL_MINSIZE,
1699-
ALLOCSET_SMALL_INITSIZE,
1700-
ALLOCSET_SMALL_MAXSIZE);
1694+
ALLOCSET_SMALL_SIZES);
17011695

17021696
/* Prepare for input conversion of RETURNING results. */
17031697
if (fmstate->has_returning)
@@ -2294,9 +2288,7 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags)
22942288
/* Create context for per-tuple temp workspace. */
22952289
dmstate->temp_cxt = AllocSetContextCreate(estate->es_query_cxt,
22962290
"postgres_fdw temporary data",
2297-
ALLOCSET_SMALL_MINSIZE,
2298-
ALLOCSET_SMALL_INITSIZE,
2299-
ALLOCSET_SMALL_MAXSIZE);
2291+
ALLOCSET_SMALL_SIZES);
23002292

23012293
/* Prepare for input conversion of RETURNING results. */
23022294
if (dmstate->has_returning)
@@ -3479,9 +3471,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
34793471
astate.anl_cxt = CurrentMemoryContext;
34803472
astate.temp_cxt = AllocSetContextCreate(CurrentMemoryContext,
34813473
"postgres_fdw temporary data",
3482-
ALLOCSET_SMALL_MINSIZE,
3483-
ALLOCSET_SMALL_INITSIZE,
3484-
ALLOCSET_SMALL_MAXSIZE);
3474+
ALLOCSET_SMALL_SIZES);
34853475

34863476
/*
34873477
* Get the connection to use. We do the remote access as the table's

contrib/sepgsql/uavc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,11 @@ sepgsql_avc_init(void)
498498
int rc;
499499

500500
/*
501-
* All the avc stuff shall be allocated on avc_mem_cxt
501+
* All the avc stuff shall be allocated in avc_mem_cxt
502502
*/
503503
avc_mem_cxt = AllocSetContextCreate(TopMemoryContext,
504504
"userspace access vector cache",
505-
ALLOCSET_DEFAULT_MINSIZE,
506-
ALLOCSET_DEFAULT_INITSIZE,
507-
ALLOCSET_DEFAULT_MAXSIZE);
505+
ALLOCSET_DEFAULT_SIZES);
508506
memset(avc_slots, 0, sizeof(avc_slots));
509507
avc_num_caches = 0;
510508
avc_lru_hint = 0;

contrib/test_decoding/test_decoding.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ pg_decode_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt,
102102
data = palloc0(sizeof(TestDecodingData));
103103
data->context = AllocSetContextCreate(ctx->context,
104104
"text conversion context",
105-
ALLOCSET_DEFAULT_MINSIZE,
106-
ALLOCSET_DEFAULT_INITSIZE,
107-
ALLOCSET_DEFAULT_MAXSIZE);
105+
ALLOCSET_DEFAULT_SIZES);
108106
data->include_xids = true;
109107
data->include_timestamp = false;
110108
data->skip_empty_xacts = false;

doc/src/sgml/config.sgml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,8 @@ include_dir 'conf.d'
12271227
</para>
12281228

12291229
<para>
1230-
If this is on, you should create users as <literal>username@dbname</>.
1231-
When <literal>username</> is passed by a connecting client,
1230+
If this is on, you should create users as <replaceable>username@dbname</>.
1231+
When <replaceable>username</> is passed by a connecting client,
12321232
<literal>@</> and the database name are appended to the user
12331233
name and that database-specific user name is looked up by the
12341234
server. Note that when you create users with names containing
@@ -5388,9 +5388,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
53885388
<title>Process Title</title>
53895389

53905390
<para>
5391-
These settings control how the process title as seen
5392-
by <command>ps</command> is modified. See <xref linkend="monitoring-ps">
5393-
for details.
5391+
These settings control how process titles of server processes are
5392+
modified. Process titles are typically viewed using programs like
5393+
<application>ps</> or, on Windows, <application>Process Explorer</>.
5394+
See <xref linkend="monitoring-ps"> for details.
53945395
</para>
53955396

53965397
<variablelist>
@@ -5403,18 +5404,14 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
54035404
<listitem>
54045405
<para>
54055406
Sets the cluster name that appears in the process title for all
5406-
processes in this cluster. The name can be any string of less than
5407-
<symbol>NAMEDATALEN</> characters (64 characters in a standard
5407+
server processes in this cluster. The name can be any string of less
5408+
than <symbol>NAMEDATALEN</> characters (64 characters in a standard
54085409
build). Only printable ASCII characters may be used in the
54095410
<varname>cluster_name</varname> value. Other characters will be
54105411
replaced with question marks (<literal>?</literal>). No name is shown
54115412
if this parameter is set to the empty string <literal>''</> (which is
54125413
the default). This parameter can only be set at server start.
54135414
</para>
5414-
<para>
5415-
The process title is typically viewed using programs like
5416-
<application>ps</> or, on Windows, <application>Process Explorer</>.
5417-
</para>
54185415
</listitem>
54195416
</varlistentry>
54205417

@@ -5427,11 +5424,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
54275424
<listitem>
54285425
<para>
54295426
Enables updating of the process title every time a new SQL command
5430-
is received by the server. The process title is typically viewed
5431-
by the <command>ps</> command,
5432-
or in Windows by using the <application>Process Explorer</>.
5433-
This value defaults to off on Windows platforms due to the
5434-
platform's significant overhead for updating the process title.
5427+
is received by the server.
5428+
This setting defaults to <literal>on</> on most platforms, but it
5429+
defaults to <literal>off</> on Windows due to that platform's larger
5430+
overhead for updating the process title.
54355431
Only superusers can change this setting.
54365432
</para>
54375433
</listitem>

doc/src/sgml/func.sgml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13737,7 +13737,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
1373713737
<entry>No</entry>
1373813738
<entry>
1373913739
multiple continuous percentile: returns an array of results matching
13740-
the shape of the <literal>fractions</literal> parameter, with each
13740+
the shape of the <replaceable>fractions</replaceable> parameter, with each
1374113741
non-null element replaced by the value corresponding to that percentile
1374213742
</entry>
1374313743
</row>
@@ -13782,7 +13782,7 @@ SELECT xmlagg(x) FROM (SELECT x FROM test ORDER BY y DESC) AS tab;
1378213782
<entry>No</entry>
1378313783
<entry>
1378413784
multiple discrete percentile: returns an array of results matching the
13785-
shape of the <literal>fractions</literal> parameter, with each non-null
13785+
shape of the <replaceable>fractions</replaceable> parameter, with each non-null
1378613786
element replaced by the input value corresponding to that percentile
1378713787
</entry>
1378813788
</row>
@@ -16787,7 +16787,7 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
1678716787
<para>
1678816788
<function>pg_options_to_table</function> returns the set of storage
1678916789
option name/value pairs
16790-
(<literal>option_name</>/<literal>option_value</>) when passed
16790+
(<replaceable>option_name</>/<replaceable>option_value</>) when passed
1679116791
<structname>pg_class</>.<structfield>reloptions</> or
1679216792
<structname>pg_attribute</>.<structfield>attoptions</>.
1679316793
</para>
@@ -18508,7 +18508,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1850818508
<literal><function>pg_replication_origin_drop(<parameter>node_name</parameter> <type>text</type>)</function></literal>
1850918509
</entry>
1851018510
<entry>
18511-
void
18511+
<type>void</>
1851218512
</entry>
1851318513
<entry>
1851418514
Delete a previously created replication origin, including any
@@ -18540,7 +18540,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1854018540
<literal><function>pg_replication_origin_session_setup(<parameter>node_name</parameter> <type>text</type>)</function></literal>
1854118541
</entry>
1854218542
<entry>
18543-
void
18543+
<type>void</>
1854418544
</entry>
1854518545
<entry>
1854618546
Mark the current session as replaying from the given
@@ -18558,7 +18558,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1855818558
<literal><function>pg_replication_origin_session_reset()</function></literal>
1855918559
</entry>
1856018560
<entry>
18561-
void
18561+
<type>void</>
1856218562
</entry>
1856318563
<entry>
1856418564
Cancel the effects
@@ -18607,7 +18607,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1860718607
<literal><function>pg_replication_origin_xact_setup(<parameter>origin_lsn</parameter> <type>pg_lsn</type>, <parameter>origin_timestamp</parameter> <type>timestamptz</type>)</function></literal>
1860818608
</entry>
1860918609
<entry>
18610-
void
18610+
<type>void</>
1861118611
</entry>
1861218612
<entry>
1861318613
Mark the current transaction as replaying a transaction that has
@@ -18626,7 +18626,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1862618626
<literal><function>pg_replication_origin_xact_reset()</function></literal>
1862718627
</entry>
1862818628
<entry>
18629-
void
18629+
<type>void</>
1863018630
</entry>
1863118631
<entry>
1863218632
Cancel the effects of
@@ -18642,7 +18642,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1864218642
<literal>pg_replication_origin_advance<function>(<parameter>node_name</parameter> <type>text</type>, <parameter>pos</parameter> <type>pg_lsn</type>)</function></literal>
1864318643
</entry>
1864418644
<entry>
18645-
void
18645+
<type>void</>
1864618646
</entry>
1864718647
<entry>
1864818648
Set replication progress for the given node to the given
@@ -19102,7 +19102,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1910219102
<tbody>
1910319103
<row>
1910419104
<entry>
19105-
<literal><function>brin_summarize_new_values(<parameter>index_oid</> <type>regclass</>)</function></literal>
19105+
<literal><function>brin_summarize_new_values(<parameter>index</> <type>regclass</>)</function></literal>
1910619106
</entry>
1910719107
<entry><type>integer</type></entry>
1910819108
<entry>summarize page ranges not already summarized</entry>
@@ -19119,8 +19119,8 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1911919119
</table>
1912019120

1912119121
<para>
19122-
<function>brin_summarize_new_values</> receives a BRIN index OID as
19123-
argument and inspects the index to find page ranges in the base table
19122+
<function>brin_summarize_new_values</> accepts the OID or name of a
19123+
BRIN index and inspects the index to find page ranges in the base table
1912419124
that are not currently summarized by the index; for any such range
1912519125
it creates a new summary index tuple by scanning the table pages.
1912619126
It returns the number of new page range summaries that were inserted
@@ -19129,12 +19129,12 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
1912919129

1913019130
<para>
1913119131
<function>gin_clean_pending_list</> accepts the OID or name of
19132-
a GIN index and cleans up the pending list of the specified GIN index
19132+
a GIN index and cleans up the pending list of the specified index
1913319133
by moving entries in it to the main GIN data structure in bulk.
19134-
It returns the number of pages cleaned up from the pending list.
19135-
Note that if the argument is a GIN index built with <literal>fastupdate</>
19136-
option disabled, the cleanup does not happen and the return value is 0
19137-
because the index doesn't have a pending list.
19134+
It returns the number of pages removed from the pending list.
19135+
Note that if the argument is a GIN index built with
19136+
the <literal>fastupdate</> option disabled, no cleanup happens and the
19137+
return value is 0, because the index doesn't have a pending list.
1913819138
Please see <xref linkend="gin-fast-update"> and <xref linkend="gin-tips">
1913919139
for details of the pending list and <literal>fastupdate</> option.
1914019140
</para>

doc/src/sgml/libpq.sgml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,6 +2767,22 @@ char *PQresultErrorField(const PGresult *res, int fieldcode);
27672767
</listitem>
27682768
</varlistentry>
27692769

2770+
<varlistentry id="libpq-pg-diag-severity-nonlocalized">
2771+
<term><symbol>PG_DIAG_SEVERITY_NONLOCALIZED</></term>
2772+
<listitem>
2773+
<para>
2774+
The severity; the field contents are <literal>ERROR</>,
2775+
<literal>FATAL</>, or <literal>PANIC</> (in an error message),
2776+
or <literal>WARNING</>, <literal>NOTICE</>, <literal>DEBUG</>,
2777+
<literal>INFO</>, or <literal>LOG</> (in a notice message).
2778+
This is identical to the <symbol>PG_DIAG_SEVERITY</> field except
2779+
that the contents are never localized. This is present only in
2780+
reports generated by <productname>PostgreSQL</> versions 9.6
2781+
and later.
2782+
</para>
2783+
</listitem>
2784+
</varlistentry>
2785+
27702786
<varlistentry id="libpq-pg-diag-sqlstate">
27712787
<term>
27722788
<symbol>PG_DIAG_SQLSTATE</>

0 commit comments

Comments
 (0)