Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
bed5eac
Unset MyBEEntry, making elog.c's call to pgstat_get_my_query_id() safe.
anarazel Aug 19, 2021
8d2d6ec
Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
tglsfdc Aug 19, 2021
f1899f2
pg_amcheck: Fix block number parsing on command line
petere Aug 20, 2021
9a6345e
pg_resetwal: Improve numeric command-line argument parsing
petere Aug 20, 2021
5b3f471
psql: Add test for query canceling
petere Aug 20, 2021
9a9c8b9
Remove --quiet option from pg_amcheck
danielgustafsson Aug 20, 2021
facce1d
Fix performance bug in regexp's citerdissect/creviterdissect.
tglsfdc Aug 20, 2021
26ae660
Improve error messages about misuse of SELECT INTO.
tglsfdc Aug 21, 2021
22c4e88
Allow parallel DISTINCT
david-rowley Aug 22, 2021
945f395
Fix broken regression test caused by 22c4e88eb
david-rowley Aug 22, 2021
c818c25
psql: Improve portability of query cancel test
petere Aug 22, 2021
a3fcbcd
Fix backup manifests to generate correct WAL-Ranges across timelines
michaelpq Aug 23, 2021
f7bda63
Improve defaults shown in postgresql.conf.sample and pg_settings
bmomjian Aug 23, 2021
515e3d8
Avoid creating archive status ".ready" files too early
alvherre Aug 23, 2021
9bbf6f7
Prevent regexp back-refs from sometimes matching when they shouldn't.
tglsfdc Aug 23, 2021
1046a69
Fix Alter Subscription's Add/Drop Publication behavior.
Aug 24, 2021
65dc30c
Fix regexp misbehavior with capturing parens inside "{0}".
tglsfdc Aug 24, 2021
71fee6c
ecpg: Remove trailing period from error message.
MasaoFujii Aug 25, 2021
085400f
Improve error message about valid value for distance in phrase operator.
MasaoFujii Aug 25, 2021
170aec6
Avoid using ambiguous word "positive" in error message.
MasaoFujii Aug 25, 2021
3465113
Add tab completion for EXPLAIN .. EXECUTE in psql
michaelpq Aug 25, 2021
255ed90
Doc: Tweak function prototype indentation for consistency.
Aug 25, 2021
29b5905
Fix toast rewrites in logical decoding.
Aug 25, 2021
1387925
Fix incorrect merge in ECPG code with DECLARE
michaelpq Aug 25, 2021
bb9ff46
Fix typo
petere Aug 25, 2021
43d4dd8
psql: Make cancel test more timing robust
petere Aug 25, 2021
a780b2f
Fix broken snapshot handling in parallel workers.
robertmhaas Aug 25, 2021
373e08a
Remove redundant test.
tglsfdc Aug 25, 2021
eb0d0d2
Rename unicode_combining_table to unicode_width_table
j-naylor Aug 20, 2021
78ab944
Change mbbisearch to return the character range
j-naylor Aug 20, 2021
0d906b2
Fix handling of partitioned index in RelationGetNumberOfBlocksInFork()
petere Aug 26, 2021
f8c8a8b
Revert "Change mbbisearch to return the character range"
j-naylor Aug 26, 2021
1563ecb
Revert "Rename unicode_combining_table to unicode_width_table"
j-naylor Aug 26, 2021
bab9821
Update display widths as part of updating Unicode
j-naylor Aug 26, 2021
5bc429a
Extend collection of Unicode combining characters to beyond the BMP
j-naylor Aug 26, 2021
191dce1
contrib/amcheck: Add heapam CHECK_FOR_INTERRUPTS().
petergeoghegan Aug 27, 2021
abc0910
Add logical change details to logical replication worker errcontext.
Aug 27, 2021
d782d59
Avoid invoking PQfnumber in loop constructs
danielgustafsson Aug 27, 2021
8f72bec
Handle interaction of regexp's makesearch and MATCHALL more honestly.
tglsfdc Aug 27, 2021
e279952
Change Texinfo output to UTF-8
petere Aug 27, 2021
de5dcb0
vacuumlazy.c: Remove unnecessary parentheses.
petergeoghegan Aug 27, 2021
fdfbfa2
Reorder log_autovacuum_min_duration log output.
petergeoghegan Aug 27, 2021
bda8225
track_io_timing logging: Don't special case 0 ms.
petergeoghegan Aug 27, 2021
10d2695
docs: clarify bgw_restart_time documentation
danielgustafsson Aug 27, 2021
f017272
docs: Add command tags for SQL commands
sfrost Aug 27, 2021
ce42efa
Use maintenance_io_concurrency for ANALYZE prefetch
sfrost Aug 27, 2021
3778bcb
Count SP-GiST index scans in pg_stat statistics.
tglsfdc Aug 27, 2021
97ddda8
Fix data loss in wal_level=minimal crash recovery of CREATE TABLESPACE.
nmisch Aug 28, 2021
fc40ba1
psql \dP: reference regclass with "pg_catalog." prefix
alvherre Aug 28, 2021
1f092a3
psql \dX: reference regclass with "pg_catalog." prefix
alvherre Aug 28, 2021
375aed3
Keep stats up to date for partitioned tables
alvherre Aug 28, 2021
10d5822
Doc: add a little about LACON execution to src/backend/regex/README.
tglsfdc Aug 29, 2021
d3fa876
Add more tab completion support for ALTER TABLE ADD in psql
michaelpq Aug 30, 2021
dcac5e7
Refactor sharedfileset.c to separate out fileset implementation.
Aug 30, 2021
bad6cef
Fix incorrect error code in StartupReplicationOrigin().
Aug 30, 2021
bfd4567
pgbench: Avoid unnecessary measurement of connection delays.
MasaoFujii Aug 30, 2021
a397109
psql: Fix name quoting on extended statistics
alvherre Aug 30, 2021
961dd75
Report tuple address in data-corruption error message
alvherre Aug 30, 2021
99709c9
Refactor one use of IDENTIFY_SYSTEM in WAL streaming code of pg_baseb…
michaelpq Aug 31, 2021
f2bbadc
Add tab completion for data types after ALTER TABLE ADD [COLUMN] in psql
michaelpq Aug 31, 2021
bb466c6
Prohibit map and grep in void context
danielgustafsson Aug 31, 2021
589be6f
Fix missed lock acquisition while inlining new-style SQL functions.
tglsfdc Aug 31, 2021
5be8ce8
Fix lookup error in extended stats ownership check
tvondra Aug 31, 2021
628bc9d
Rename the role in stats_ext to have regress_ prefix
tvondra Aug 31, 2021
6c450a8
Cache the results of format_type() queries in pg_dump.
tglsfdc Aug 31, 2021
bd3611d
In pg_dump, avoid doing per-table queries for RLS policies.
tglsfdc Aug 31, 2021
543f36b
Mark the timestamptz variant of date_bin() as stable
j-naylor Aug 31, 2021
aec5cc9
Add historic commit to git-blame-ignore-revs file.
petergeoghegan Aug 31, 2021
47029f7
Remove unneeded old_rel_pages VACUUM state field.
petergeoghegan Aug 31, 2021
13380e1
Don't print extra parens around expressions in extended stats
tvondra Aug 31, 2021
6320806
vacuumlazy.c: Correct prune state comment.
petergeoghegan Aug 31, 2021
0f6aa89
Remove obsolete nbtree relation extension comment.
petergeoghegan Aug 31, 2021
de1d4fe
Add PostgresNode::command_fails_like()
michaelpq Sep 1, 2021
c4f7a6b
Refactor one conversion of SQLSTATE to string in elog.c
michaelpq Sep 1, 2021
b175b9c
VACUUM VERBOSE: Don't report "pages removed".
petergeoghegan Sep 1, 2021
8d0138e
Fix the random test failure in 001_rep_changes.
Sep 1, 2021
4dc528b
pgbench: Fix bug in measurement of disconnection delays.
MasaoFujii Sep 1, 2021
590ecd9
Fix incorrect format placeholders
petere Sep 1, 2021
b0c0662
Improve tab-completion for CREATE PUBLICATION.
MasaoFujii Sep 1, 2021
537ca68
Identify simple column references in extended statistics
tvondra Sep 1, 2021
2dc53fe
Refactor postgresImportForeignSchema to avoid code duplication.
tglsfdc Sep 1, 2021
469150a
Doc: clarify how triggers relate to transactions.
tglsfdc Sep 1, 2021
06ba4a6
Use COPY FREEZE in pgbench for faster benchmark table population.
tatsuo-ishii Sep 2, 2021
163074e
doc: Replace some uses of "which" by "that" in parallel.sgml
michaelpq Sep 2, 2021
31c389d
Optimize fileset usage in apply worker.
Sep 2, 2021
e042678
Enhance pg_stat_reset_single_table_counters function.
MasaoFujii Sep 2, 2021
ba1b763
Remove superfluous variable assignment
danielgustafsson Sep 2, 2021
ce773f2
Fix float4/float8 hash functions to produce uniform results for NaNs.
tglsfdc Sep 2, 2021
c95ede4
In count_usable_fds(), duplicate stderr not stdin.
tglsfdc Sep 2, 2021
4c2eab3
Fix pkg-config files for static linking
petere Sep 3, 2021
6588d84
Make pkg-config files cross-compile friendly
petere Sep 3, 2021
fd54914
Fix portability issue in tests from commit ce773f230.
tglsfdc Sep 3, 2021
0c6a6a0
Set the volatility of the timestamptz version of date_bin() back to i…
j-naylor Sep 3, 2021
db2760a
Disallow creating an ICU collation if the DB encoding won't support it.
tglsfdc Sep 3, 2021
87ad491
Remove arbitrary MAXPGPATH limit on command lengths in pg_ctl.
tglsfdc Sep 4, 2021
96b6650
Revert "Avoid creating archive status ".ready" files too early"
alvherre Sep 4, 2021
ac5ea66
Minor improvements for psql help output.
tglsfdc Sep 4, 2021
b30cc0f
Further portability tweaks for float4/float8 hash functions.
tglsfdc Sep 4, 2021
5fcb23c
Remove some unused variables in TAP tests
michaelpq Sep 6, 2021
0bd305e
Move the shared memory size calculation to its own function
michaelpq Sep 6, 2021
55392bc
Improve fix pkg-config files for static linking
petere Sep 6, 2021
78aa616
Fix typo in comments.
MasaoFujii Sep 6, 2021
388e71a
Make timetz_zone() stable, and correct a bug for DYNTZ abbreviations.
tglsfdc Sep 6, 2021
89dba59
Fix actively-misleading comments about the contents of struct pg_tm.
tglsfdc Sep 6, 2021
0c6828f
Add PublicationTable and PublicationRelInfo structs
alvherre Sep 6, 2021
8670b9b
AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS.
nmisch Sep 6, 2021
bd5846e
Further fix psql query-cancel test.
tglsfdc Sep 6, 2021
4c34788
Log new catalog xmin candidate in LogicalIncreaseXminForSlot().
Sep 7, 2021
449ab63
postgres_fdw: Allow application_name of remote connection to be set v…
MasaoFujii Sep 7, 2021
6ac763f
Fix missing words in comment.
hlinnaka Sep 7, 2021
76e38b3
windows: Only consider us to be running as service if stderr is invalid.
anarazel Sep 7, 2021
d6c916f
Consistently use read-only instead of "read only"
mhagander Sep 7, 2021
fd0625c
Clean up some code using "(expr) ? true : false"
michaelpq Sep 8, 2021
bd17880
Introduce GUC shared_memory_size
michaelpq Sep 8, 2021
aa37a43
Fix compilation warning in ipci.c
michaelpq Sep 8, 2021
8bd5342
Invalidate relcache for publications defined for all tables.
Sep 8, 2021
bb1412b
Fix incorrect format placeholders
petere Sep 8, 2021
98dbef9
postgres_fdw: Revert unstable tests for postgres_fdw.application_name.
MasaoFujii Sep 8, 2021
a3d2b1b
Disable anonymous record hash support except in special cases
petere Sep 8, 2021
7390b64
Fix typo
petere Sep 8, 2021
f7c53bb
Consistently use "superuser" instead of "super user"
danielgustafsson Sep 8, 2021
362e2dc
Fix rewriter to set hasModifyingCTE correctly on rewritten queries.
tglsfdc Sep 8, 2021
7cffa2e
In psql tab completion, offer spelled-out commands not abbreviations.
tglsfdc Sep 8, 2021
4907984
Fix misleading comments about TOAST access macros.
tglsfdc Sep 8, 2021
072e2f8
Avoid useless malloc/free traffic around getFormattedTypeName().
tglsfdc Sep 8, 2021
3b23159
Make shared_memory_size a preset option
michaelpq Sep 9, 2021
cbdf75b
Remove useless casts
petere Sep 9, 2021
639a86e
Remove Value node struct
petere Sep 9, 2021
0ffbe90
Fix _equalA_Const
petere Sep 9, 2021
596ba75
Fix issue with WAL archiving in standby.
MasaoFujii Sep 9, 2021
8481f99
Check for relation length overrun soon enough.
tglsfdc Sep 9, 2021
9bcbd7c
pgbench: Stop counting skipped transactions as soon as timer is excee…
MasaoFujii Sep 9, 2021
cba79a1
Avoid fetching from an already-terminated plan.
tglsfdc Sep 9, 2021
b073c3c
Revoke PUBLIC CREATE from public schema, now owned by pg_database_owner.
nmisch Sep 10, 2021
2d689f2
Update src/test/kerberos to account for previous commit.
nmisch Sep 10, 2021
c1b7a6c
Fix some anomalies with NO SCROLL cursors.
tglsfdc Sep 10, 2021
e757080
Make pg_regexec() robust against out-of-range search_start.
tglsfdc Sep 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ b5bce6c1ec6061c8a4f730d927e162db7e2ce365 # 2016-08-15 13:42:51 -0400
de94e2af184e25576b13cbda8cf825118835d1cd # 2016-04-06 11:34:02 -0400
# Run pgindent on a batch of (mostly-planner-related) source files.

be060cbcd42737693f6fd425db4c139121181cce # 2016-03-09 13:51:11 -0500
# Re-pgindent vacuumlazy.c.

d0cd7bda97a626049aa7d247374909c52399c413 # 2016-02-04 22:30:08 -0500
# postgres_fdw: pgindent run.

Expand Down
2 changes: 2 additions & 0 deletions contrib/amcheck/verify_heapam.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ verify_heapam(PG_FUNCTION_ARGS)
{
OffsetNumber maxoff;

CHECK_FOR_INTERRUPTS();

/* Optionally skip over all-frozen or all-visible blocks */
if (skip_option != SKIP_PAGES_NONE)
{
Expand Down
2 changes: 1 addition & 1 deletion contrib/intarray/_int_tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ inner_int_contains(ArrayType *a, ArrayType *b)
break; /* db[j] is not in da */
}

return (n == nb) ? true : false;
return (n == nb);
}

/* arguments are assumed sorted */
Expand Down
2 changes: 1 addition & 1 deletion contrib/intarray/bench/create_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
else
{
print $msg "$i\t{" . join(',', @sect) . "}\n";
map { print $map "$i\t$_\n" } @sect;
print $map "$i\t$_\n" foreach @sect;
}
}
close $map;
Expand Down
2 changes: 1 addition & 1 deletion contrib/ltree/ltree_gist.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ltree_same(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(result);

if (LTG_ISONENODE(a))
*result = (ISEQ(LTG_NODE(a), LTG_NODE(b))) ? true : false;
*result = ISEQ(LTG_NODE(a), LTG_NODE(b));
else
{
int32 i;
Expand Down
25 changes: 21 additions & 4 deletions contrib/postgres_fdw/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,11 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
/*
* Construct connection params from generic options of ForeignServer
* and UserMapping. (Some of them might not be libpq options, in
* which case we'll just waste a few array slots.) Add 3 extra slots
* for fallback_application_name, client_encoding, end marker.
* which case we'll just waste a few array slots.) Add 4 extra slots
* for application_name, fallback_application_name, client_encoding,
* end marker.
*/
n = list_length(server->options) + list_length(user->options) + 3;
n = list_length(server->options) + list_length(user->options) + 4;
keywords = (const char **) palloc(n * sizeof(char *));
values = (const char **) palloc(n * sizeof(char *));

Expand All @@ -366,7 +367,23 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
n += ExtractConnectionOptions(user->options,
keywords + n, values + n);

/* Use "postgres_fdw" as fallback_application_name. */
/*
* Use pgfdw_application_name as application_name if set.
*
* PQconnectdbParams() processes the parameter arrays from start to
* end. If any key word is repeated, the last value is used. Therefore
* note that pgfdw_application_name must be added to the arrays after
* options of ForeignServer are, so that it can override
* application_name set in ForeignServer.
*/
if (pgfdw_application_name && *pgfdw_application_name != '\0')
{
keywords[n] = "application_name";
values[n] = pgfdw_application_name;
n++;
}

/* Use "postgres_fdw" as fallback_application_name */
keywords[n] = "fallback_application_name";
values[n] = "postgres_fdw";
n++;
Expand Down
2 changes: 1 addition & 1 deletion contrib/postgres_fdw/expected/postgres_fdw.out
Original file line number Diff line number Diff line change
Expand Up @@ -9428,7 +9428,7 @@ $d$;
-- But creation of user mappings for non-superusers should fail
CREATE USER MAPPING FOR public SERVER loopback_nopw;
CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw;
CREATE FOREIGN TABLE ft1_nopw (
CREATE FOREIGN TABLE pg_temp.ft1_nopw (
c1 int NOT NULL,
c2 int NOT NULL,
c3 text,
Expand Down
35 changes: 34 additions & 1 deletion contrib/postgres_fdw/option.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* option.c
* FDW option handling for postgres_fdw
* FDW and GUC option handling for postgres_fdw
*
* Portions Copyright (c) 2012-2021, PostgreSQL Global Development Group
*
Expand Down Expand Up @@ -45,6 +45,13 @@ static PgFdwOption *postgres_fdw_options;
*/
static PQconninfoOption *libpq_options;

/*
* GUC parameters
*/
char *pgfdw_application_name = NULL;

void _PG_init(void);

/*
* Helper functions
*/
Expand Down Expand Up @@ -435,3 +442,29 @@ ExtractExtensionList(const char *extensionsString, bool warnOnMissing)
list_free(extlist);
return extensionOids;
}

/*
* Module load callback
*/
void
_PG_init(void)
{
/*
* Unlike application_name GUC, don't set GUC_IS_NAME flag nor check_hook
* to allow postgres_fdw.application_name to be any string more than
* NAMEDATALEN characters and to include non-ASCII characters. Instead,
* remote server truncates application_name of remote connection to less
* than NAMEDATALEN and replaces any non-ASCII characters in it with a '?'
* character.
*/
DefineCustomStringVariable("postgres_fdw.application_name",
"Sets the application name to be used on the remote server.",
NULL,
&pgfdw_application_name,
NULL,
PGC_USERSET,
0,
NULL,
NULL,
NULL);
}
62 changes: 29 additions & 33 deletions contrib/postgres_fdw/postgres_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ enum FdwModifyPrivateIndex
FdwModifyPrivateUpdateSql,
/* Integer list of target attribute numbers for INSERT/UPDATE */
FdwModifyPrivateTargetAttnums,
/* Length till the end of VALUES clause (as an integer Value node) */
/* Length till the end of VALUES clause (as an Integer node) */
FdwModifyPrivateLen,
/* has-returning flag (as an integer Value node) */
/* has-returning flag (as an Integer node) */
FdwModifyPrivateHasReturning,
/* Integer list of attribute numbers retrieved by RETURNING */
FdwModifyPrivateRetrievedAttrs
Expand All @@ -122,11 +122,11 @@ enum FdwDirectModifyPrivateIndex
{
/* SQL statement to execute remotely (as a String node) */
FdwDirectModifyPrivateUpdateSql,
/* has-returning flag (as an integer Value node) */
/* has-returning flag (as an Integer node) */
FdwDirectModifyPrivateHasReturning,
/* Integer list of attribute numbers retrieved by RETURNING */
FdwDirectModifyPrivateRetrievedAttrs,
/* set-processed flag (as an integer Value node) */
/* set-processed flag (as an Integer node) */
FdwDirectModifyPrivateSetProcessed
};

Expand Down Expand Up @@ -280,9 +280,9 @@ typedef struct PgFdwAnalyzeState
*/
enum FdwPathPrivateIndex
{
/* has-final-sort flag (as an integer Value node) */
/* has-final-sort flag (as an Integer node) */
FdwPathPrivateHasFinalSort,
/* has-limit flag (as an integer Value node) */
/* has-limit flag (as an Integer node) */
FdwPathPrivateHasLimit
};

Expand Down Expand Up @@ -5287,45 +5287,41 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
"SELECT relname, "
" attname, "
" format_type(atttypid, atttypmod), "
" attnotnull, ");
" attnotnull, "
" pg_get_expr(adbin, adrelid), ");

/* Generated columns are supported since Postgres 12 */
if (PQserverVersion(conn) >= 120000)
appendStringInfoString(&buf,
" attgenerated, "
" pg_get_expr(adbin, adrelid), ");
" attgenerated, ");
else
appendStringInfoString(&buf,
" NULL, "
" pg_get_expr(adbin, adrelid), ");
" NULL, ");

if (import_collate)
appendStringInfoString(&buf,
" collname, "
" collnsp.nspname "
"FROM pg_class c "
" JOIN pg_namespace n ON "
" relnamespace = n.oid "
" LEFT JOIN pg_attribute a ON "
" attrelid = c.oid AND attnum > 0 "
" AND NOT attisdropped "
" LEFT JOIN pg_attrdef ad ON "
" adrelid = c.oid AND adnum = attnum "
" collnsp.nspname ");
else
appendStringInfoString(&buf,
" NULL, NULL ");

appendStringInfoString(&buf,
"FROM pg_class c "
" JOIN pg_namespace n ON "
" relnamespace = n.oid "
" LEFT JOIN pg_attribute a ON "
" attrelid = c.oid AND attnum > 0 "
" AND NOT attisdropped "
" LEFT JOIN pg_attrdef ad ON "
" adrelid = c.oid AND adnum = attnum ");

if (import_collate)
appendStringInfoString(&buf,
" LEFT JOIN pg_collation coll ON "
" coll.oid = attcollation "
" LEFT JOIN pg_namespace collnsp ON "
" collnsp.oid = collnamespace ");
else
appendStringInfoString(&buf,
" NULL, NULL "
"FROM pg_class c "
" JOIN pg_namespace n ON "
" relnamespace = n.oid "
" LEFT JOIN pg_attribute a ON "
" attrelid = c.oid AND attnum > 0 "
" AND NOT attisdropped "
" LEFT JOIN pg_attrdef ad ON "
" adrelid = c.oid AND adnum = attnum ");

appendStringInfoString(&buf,
"WHERE c.relkind IN ("
Expand Down Expand Up @@ -5405,9 +5401,9 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
attname = PQgetvalue(res, i, 1);
typename = PQgetvalue(res, i, 2);
attnotnull = PQgetvalue(res, i, 3);
attgenerated = PQgetisnull(res, i, 4) ? (char *) NULL :
attdefault = PQgetisnull(res, i, 4) ? (char *) NULL :
PQgetvalue(res, i, 4);
attdefault = PQgetisnull(res, i, 5) ? (char *) NULL :
attgenerated = PQgetisnull(res, i, 5) ? (char *) NULL :
PQgetvalue(res, i, 5);
collname = PQgetisnull(res, i, 6) ? (char *) NULL :
PQgetvalue(res, i, 6);
Expand Down
1 change: 1 addition & 0 deletions contrib/postgres_fdw/postgres_fdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ extern int ExtractConnectionOptions(List *defelems,
const char **values);
extern List *ExtractExtensionList(const char *extensionsString,
bool warnOnMissing);
extern char *pgfdw_application_name;

/* in deparse.c */
extern void classifyConditions(PlannerInfo *root,
Expand Down
2 changes: 1 addition & 1 deletion contrib/postgres_fdw/sql/postgres_fdw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2797,7 +2797,7 @@ $d$;
CREATE USER MAPPING FOR public SERVER loopback_nopw;
CREATE USER MAPPING FOR CURRENT_USER SERVER loopback_nopw;

CREATE FOREIGN TABLE ft1_nopw (
CREATE FOREIGN TABLE pg_temp.ft1_nopw (
c1 int NOT NULL,
c2 int NOT NULL,
c3 text,
Expand Down
2 changes: 1 addition & 1 deletion contrib/sepgsql/selinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ static int sepgsql_mode = SEPGSQL_MODE_INTERNAL;
bool
sepgsql_is_enabled(void)
{
return (sepgsql_mode != SEPGSQL_MODE_DISABLED ? true : false);
return (sepgsql_mode != SEPGSQL_MODE_DISABLED);
}

/*
Expand Down
22 changes: 22 additions & 0 deletions contrib/test_decoding/expected/toast.out
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,28 @@ WHERE data NOT LIKE '%INSERT: %';
COMMIT
(4 rows)

/*
* Test decoding relation rewrite with toast. The insert into tbl2 within the
* same transaction is there to check that there is no remaining toast_hash not
* being reset.
*/
CREATE TABLE tbl1 (a INT, b TEXT);
CREATE TABLE tbl2 (a INT);
ALTER TABLE tbl1 ALTER COLUMN b SET STORAGE EXTERNAL;
BEGIN;
INSERT INTO tbl1 VALUES(1, repeat('a', 4000)) ;
ALTER TABLE tbl1 ADD COLUMN id serial primary key;
INSERT INTO tbl2 VALUES(1);
commit;
SELECT substr(data, 1, 200) FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
substr
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BEGIN
table public.tbl1: INSERT: a[integer]:1 b[text]:'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
table public.tbl2: INSERT: a[integer]:1
COMMIT
(4 rows)

SELECT pg_drop_replication_slot('regression_slot');
pg_drop_replication_slot
--------------------------
Expand Down
16 changes: 16 additions & 0 deletions contrib/test_decoding/sql/toast.sql
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,20 @@ DROP TABLE toasted_several;

SELECT regexp_replace(data, '^(.{100}).*(.{100})$', '\1..\2') FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1')
WHERE data NOT LIKE '%INSERT: %';

/*
* Test decoding relation rewrite with toast. The insert into tbl2 within the
* same transaction is there to check that there is no remaining toast_hash not
* being reset.
*/
CREATE TABLE tbl1 (a INT, b TEXT);
CREATE TABLE tbl2 (a INT);
ALTER TABLE tbl1 ALTER COLUMN b SET STORAGE EXTERNAL;
BEGIN;
INSERT INTO tbl1 VALUES(1, repeat('a', 4000)) ;
ALTER TABLE tbl1 ADD COLUMN id serial primary key;
INSERT INTO tbl2 VALUES(1);
commit;
SELECT substr(data, 1, 200) FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');

SELECT pg_drop_replication_slot('regression_slot');
2 changes: 1 addition & 1 deletion doc/src/sgml/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ MAKEINFO = makeinfo
$(DB2X_XSLTPROC) -s texi -g output-file=$(basename $@) $< -o $@

%.texi: %.texixml
$(DB2X_TEXIXML) --encoding=iso-8859-1//TRANSLIT $< --to-stdout > $@
$(DB2X_TEXIXML) --encoding=utf-8 $< --to-stdout > $@

%.info: %.texi
$(MAKEINFO) --enable-encoding --no-split --no-validate $< -o $@
Expand Down
4 changes: 2 additions & 2 deletions doc/src/sgml/bgworker.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ typedef struct BackgroundWorker

<para>
<structfield>bgw_restart_time</structfield> is the interval, in seconds, that
<command>postgres</command> should wait before restarting the process, in
case it crashes. It can be any positive value,
<command>postgres</command> should wait before restarting the process in
the event that it crashes. It can be any positive value,
or <literal>BGW_NEVER_RESTART</literal>, indicating not to restart the
process in case of a crash.
</para>
Expand Down
10 changes: 5 additions & 5 deletions doc/src/sgml/catalogs.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -9602,7 +9602,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
</table>

<para>
The <structname>pg_available_extensions</structname> view is read only.
The <structname>pg_available_extensions</structname> view is read-only.
</para>
</sect1>

Expand Down Expand Up @@ -9726,8 +9726,8 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
</table>

<para>
The <structname>pg_available_extension_versions</structname> view is read
only.
The <structname>pg_available_extension_versions</structname> view is
read-only.
</para>
</sect1>

Expand Down Expand Up @@ -10042,7 +10042,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
</table>

<para>
The <structname>pg_cursors</structname> view is read only.
The <structname>pg_cursors</structname> view is read-only.
</para>

</sect1>
Expand Down Expand Up @@ -11164,7 +11164,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
</table>

<para>
The <structname>pg_prepared_statements</structname> view is read only.
The <structname>pg_prepared_statements</structname> view is read-only.
</para>
</sect1>

Expand Down
Loading