Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
3857f98
Clean up some code and comments in partbounds.c.
Sep 10, 2020
994a584
Fix title in reference section
mhagander Sep 10, 2020
540612f
Add more tests for EXTRACT of date type
petere Sep 10, 2020
4fff515
doc: Remove buggy ICU collation from documentation
petere Sep 10, 2020
beff361
Add libpq's openssl dependencies to pkg-config file
petere Sep 10, 2020
c02767d
Remove unused parameter
petere Sep 10, 2020
34a947c
New contrib module, pg_surgery, with heap surgery functions.
robertmhaas Sep 10, 2020
58c6fec
Use _exit(2) for SIGQUIT during ProcessStartupPacket, too.
tglsfdc Sep 10, 2020
9f1cf97
Print WAL logical message contents in pg_waldump
alvherre Sep 10, 2020
0ba5181
Skip empty transaction stream in test_decoding.
Sep 11, 2020
6a68a23
Update copyright year
alvherre Sep 11, 2020
6693a96
Don't run atexit callbacks during signal exits from ProcessStartupPac…
tglsfdc Sep 11, 2020
10095ca
Log a message when resorting to SIGKILL during shutdown/crash recovery.
tglsfdc Sep 11, 2020
3c99230
psql: Display stats target of extended statistics
alvherre Sep 11, 2020
7634bd4
Accept SIGQUIT during error recovery in auxiliary processes.
tglsfdc Sep 11, 2020
0758964
logtape.c: do not preallocate for tapes when sorting
jeff-davis Sep 12, 2020
ddd5f6d
Remove unused function declaration in logicalproto.h.
Sep 12, 2020
03c7f1f
Fix inconsistency in determining the timestamp of the db statfile.
Sep 12, 2020
19f5a37
Use the properly transformed RangeVar for expandTableLikeClause().
tglsfdc Sep 13, 2020
ac673a1
Avoid useless allocations for information of dumpable objects in pg_d…
michaelpq Sep 14, 2020
3e0242b
Message fixes and style improvements
petere Sep 14, 2020
83158f7
Make index_set_state_flags() transactional
michaelpq Sep 14, 2020
9523301
Fix typos.
MasaoFujii Sep 14, 2020
47a3a1c
Fix interpolation in test name.
nmisch Sep 14, 2020
f560209
Make walsenders show their replication commands in pg_stat_activity.
tglsfdc Sep 14, 2020
fe4f36b
Fix compiler warning
david-rowley Sep 15, 2020
62e221e
Allow incremental sorts for windowing functions
david-rowley Sep 15, 2020
10a5b35
Report resource usage at the end of recovery
david-rowley Sep 15, 2020
ced138e
Fix use-after-free bug with event triggers in an extension script
alvherre Sep 16, 2020
19c60ad
Optimize compactify_tuples function
david-rowley Sep 16, 2020
69bd606
Fix initialization of RelationSyncEntry for streaming transactions.
Sep 16, 2020
3bd35d4
HashAgg: release write buffers sooner by rewinding tape.
jeff-davis Sep 16, 2020
c8aeaf3
Change LogicalTapeSetBlocks() to use nBlocksWritten.
jeff-davis Sep 16, 2020
5423853
Avoid retrieval of CHECK constraints and DEFAULT exprs in data-only dump
michaelpq Sep 16, 2020
e568ed0
Add leader_pid field into the example of file_fdw for csvlog.
MasaoFujii Sep 16, 2020
3d65b05
Fix bogus cache-invalidation logic in logical replication worker.
tglsfdc Sep 16, 2020
e5fac1c
Avoid unnecessary recursion to child tables in ALTER TABLE SET NOT NULL.
tglsfdc Sep 16, 2020
aac80bf
Fix amcheck child check pg_upgrade bug.
petergeoghegan Sep 16, 2020
2000b6c
Don't fetch partition check expression during InitResultRelInfo.
tglsfdc Sep 16, 2020
44fc6e2
Centralize setup of SIGQUIT handling for postmaster child processes.
tglsfdc Sep 16, 2020
07082b0
Fix bogus completion tag usage in walsender
alvherre Sep 16, 2020
add1058
Improve formatting of create_help.pl and plperl_opmask.pl output.
tglsfdc Sep 17, 2020
babef40
Teach walsender to update its process title for replication commands.
tglsfdc Sep 17, 2020
7307df1
Improve tab completion of IMPORT FOREIGN SCHEMA in psql
michaelpq Sep 17, 2020
089da3c
doc: Apply more consistently <productname> markup for OpenSSL
michaelpq Sep 17, 2020
16fa9b2
Add support for building GiST index by sorting.
hlinnaka Sep 17, 2020
45b9805
Allow CURRENT_ROLE where CURRENT_USER is accepted
petere Sep 17, 2020
b7f2dd9
Update parallel BTree scan state when the scan keys can't be satisfied.
Sep 17, 2020
9917514
Improve common/logging.c's support for multiple verbosity levels.
tglsfdc Sep 17, 2020
74d4608
Further improve pgindent's list of file exclusions.
tglsfdc Sep 17, 2020
76f412a
Remove factorial operators, leaving only the factorial() function.
tglsfdc Sep 17, 2020
1ed6b89
Remove support for postfix (right-unary) operators.
tglsfdc Sep 17, 2020
e5209bf
Try to stabilize output from rolenames regression test.
tglsfdc Sep 18, 2020
0d32511
Fix comments in heapam.c.
Sep 18, 2020
24fb35e
Update file header comments for logical/relation.c.
Sep 18, 2020
0811f76
pg_surgery: Try to stabilize regression tests.
robertmhaas Sep 18, 2020
06a7c31
Allow most keywords to be used as column labels without requiring AS.
tglsfdc Sep 18, 2020
be0a666
Remove large fill factor support from dynahash.c.
macdice Sep 18, 2020
ff28809
Code review for dynahash change.
macdice Sep 19, 2020
8354e7b
Remove unused parameters
petere Aug 25, 2020
28a61fc
Remove precedence hacks no longer needed without postfix operators.
tglsfdc Sep 19, 2020
3d13867
Fix whitespace
petere Sep 20, 2020
c2bb287
Fix new GIST build code to work under CLOBBER_CACHE_ALWAYS.
tglsfdc Sep 20, 2020
c47a240
Fix checksum calculation in the new sorting GiST build.
hlinnaka Sep 21, 2020
80fc96e
Standardize order of use strict and use warnings in Perl code
petere Sep 21, 2020
9436041
Copy editing: fix a bunch of misspellings and poor wording.
tglsfdc Sep 21, 2020
f859c2f
Fix a few more generator scripts to produce pgindent-clean output.
tglsfdc Sep 21, 2020
ce90f07
Improve the error message for an inappropriate column definition list.
tglsfdc Sep 22, 2020
c4133ec
Exclude fmgrprotos.h from pgindent processing.
tglsfdc Sep 22, 2020
9314870
Rethink API for pg_get_line.c, one more time.
tglsfdc Sep 22, 2020
c0cb87f
Remove arbitrary line length limit for libpq service files.
tglsfdc Sep 22, 2020
2e3c194
Simplify SortTocFromFile() by removing fixed buffer-size limit.
tglsfdc Sep 22, 2020
733fa9a
Allow WaitLatch() to be used without a latch.
macdice Sep 23, 2020
3ea7e95
Avoid possible dangling-pointer access in tsearch_readline_callback.
tglsfdc Sep 23, 2020
6b2c4e5
Improve error cursor positions for problems with partition bounds.
tglsfdc Sep 23, 2020
aca7484
Fix missing fsync of SLRU directories.
macdice Sep 23, 2020
83b6131
Improve behavior of tsearch_readline(), and remove t_readline().
tglsfdc Sep 24, 2020
fc5f107
Doc: sync lobj.sgml's copy of testlo.c with the latter file.
tglsfdc Sep 24, 2020
f5ea92e
Expose oldSnapshotControl definition via new header.
robertmhaas Sep 24, 2020
aecf5ee
Add new 'old_snapshot' contrib module.
robertmhaas Sep 24, 2020
c005eb0
Standardize the printf format for st_size
petere Sep 24, 2020
55b7e2f
Fix two bugs in MaintainOldSnapshotTimeMapping.
robertmhaas Sep 24, 2020
a45bc8a
Fix handling of -d "connection string" in pg_dump/pg_restore.
tglsfdc Sep 24, 2020
ca7f8e2
Remove custom memory allocation layer in pgcrypto
michaelpq Sep 25, 2020
dee663f
Defer flushing of SLRU files.
macdice Sep 25, 2020
079d0ca
Fix the logical replication from HEAD to lower versions.
Sep 26, 2020
e55f718
Revise RelationBuildRowSecurity() to avoid memory leaks.
tglsfdc Sep 26, 2020
3c88199
Further stabilize output from rolenames regression test.
tglsfdc Sep 26, 2020
41efb83
Move resolution of AlternativeSubPlan choices to the planner.
tglsfdc Sep 27, 2020
4d29e6d
Improve range checks of options for pg_test_fsync and pg_test_timing
michaelpq Sep 28, 2020
cc99baa
Improve pg_list.h's linitial(), lsecond() and co macros
david-rowley Sep 28, 2020
0baf82f
Improve tab-completion for DEALLOCATE.
MasaoFujii Sep 28, 2020
9d299a4
Minor mop-up for List improvements.
tglsfdc Sep 28, 2020
e21cbb4
Change SHA2 implementation based on OpenSSL to use EVP digest routines
michaelpq Sep 28, 2020
0a87ddf
Cache the result of converting now() to a struct pg_tm.
tglsfdc Sep 28, 2020
2dfa3fe
Remove complaints about COLLATE clauses in partition bound values.
tglsfdc Sep 28, 2020
72647ac
Assign collations in partition bound expressions.
tglsfdc Sep 28, 2020
042d801
Stabilize create_table regression test.
tglsfdc Sep 28, 2020
fe0a1dc
Revert "Change SHA2 implementation based on OpenSSL to use EVP digest…
michaelpq Sep 29, 2020
56fe008
Add for_each_from, to simplify loops starting from non-first list cells.
tglsfdc Sep 29, 2020
e66bcfb
Fix progress reporting of REINDEX CONCURRENTLY
michaelpq Sep 29, 2020
fd26f78
Archive timeline history files in standby if archive_mode is set to "…
MasaoFujii Sep 29, 2020
c2aa562
Remove excess space from jsonpath .datetime() default format string
akorotkov Sep 29, 2020
927d9ab
Support for ISO 8601 in the jsonpath .datetime() method
akorotkov Sep 29, 2020
a6b1f53
Fix memory leak in plpgsql's CALL processing.
tglsfdc Sep 29, 2020
a094c8f
Fix make_timestamp[tz] to accept negative years as meaning BC.
tglsfdc Sep 29, 2020
2b88864
Doc: Improve clarity on partitioned table limitations
david-rowley Sep 30, 2020
151c0c5
Remove obsolete replication settings within TAP tests.
tglsfdc Sep 30, 2020
300b698
Fix XML id to match GUC name
petere Sep 30, 2020
9796f45
pgbench: Use PQExpBuffer to simplify code that constructs SQL.
hlinnaka Sep 30, 2020
489c9c3
Fix handling of BC years in to_date/to_timestamp.
tglsfdc Sep 30, 2020
9fc2122
Reword partitioning error message
alvherre Sep 30, 2020
7b28913
Fix and test snapshot behavior on standby.
anarazel Oct 1, 2020
6b1c5ca
Remove logging.c from the shared library of src/common/
michaelpq Oct 1, 2020
265ea56
Set right-links during sorted GiST index build.
hlinnaka Oct 1, 2020
e176187
Fix incorrect assertion on number of array dimensions.
hlinnaka Oct 1, 2020
4964253
Put back explicit setting of replication values within TAP tests.
tglsfdc Oct 1, 2020
9d0bd95
Add block information in error context of WAL REDO apply loop
michaelpq Oct 2, 2020
8d9a935
Add pg_stat_wal statistics view.
MasaoFujii Oct 2, 2020
8550cbd
doc: Improve some documentation about HA and replication
michaelpq Oct 2, 2020
26b8361
Tidy up error reporting when converting PL/Python arrays.
hlinnaka Oct 2, 2020
472e518
doc: clarify the use of ssh port forwarding
bmomjian Oct 3, 2020
1a9388b
doc: libpq connection options can override command-line flags
bmomjian Oct 3, 2020
9081bdd
Improve <xref> vs. <command> formatting in the documentation
petere Oct 3, 2020
97b6144
Make postgres.bki use the same literal-string syntax as postgresql.conf.
tglsfdc Oct 4, 2020
10c5291
Fix handling of redundant options with COPY for "freeze" and "header"
michaelpq Oct 5, 2020
e899742
Improve stability of identity.sql regression test.
tglsfdc Oct 5, 2020
2453ea1
Support for OUT parameters in procedures
petere Oct 5, 2020
9cc3d61
Doc: fix parameter names in the docs of a couple of functions.
tglsfdc Oct 5, 2020
53c6daf
Fix two latent(?) bugs in equivclass.c.
tglsfdc Oct 5, 2020
18c170a
Include the process PID in assertion-failure messages.
tglsfdc Oct 5, 2020
253f102
Overhaul pg_hba.conf clientcert's API
bmomjian Oct 5, 2020
dd0a64e
doc: show functions returning record types and use of ROWS FROM
bmomjian Oct 5, 2020
32a9c0b
postgres_fdw: reestablish new connection if cached one is detected as…
MasaoFujii Oct 6, 2020
1df2b50
Try to unbreak 021_row_visibility.pl on mingw.
anarazel Oct 6, 2020
0a3c864
Fix compilation warning in xlog.c
michaelpq Oct 6, 2020
5b36221
Expand installation documentation to cover binary installations
mhagander Oct 6, 2020
b8c4d38
Clarify documentation around pg_dump -t option
mhagander Oct 6, 2020
1b22224
Further improvements on documentation for pg_dump -t
mhagander Oct 6, 2020
d7885b1
Build EC members for child join rels in the right memory context.
tglsfdc Oct 6, 2020
bc1fbc9
pg_upgrade; change major version comparisons to use <=, not <
bmomjian Oct 6, 2020
0691797
pg_upgrade: remove pre-8.4 code and >= 8.4 check
bmomjian Oct 6, 2020
f077070
Display the names of missing columns in error during logical replicat…
Oct 7, 2020
9e5f1f2
Rethink recent fix for pg_dump's handling of extension config tables.
tglsfdc Oct 7, 2020
6c05e5b
Clean up after newly-added tests for pg_test_fsync and pg_test_timing.
tglsfdc Oct 7, 2020
3db322e
Prevent internal overflows in date-vs-timestamp and related comparisons.
tglsfdc Oct 7, 2020
8d2a01a
Fix optimization hazard in gram.y's makeOrderedSetArgs(), redux.
tglsfdc Oct 7, 2020
9868167
Track statistics for spilling of changes from ReorderBuffer.
Oct 8, 2020
2a73164
Improve set of candidate multipliers for perfect hash function genera…
michaelpq Oct 8, 2020
b90b79e
Fix typo in multixact.c
michaelpq Oct 8, 2020
8ce423b
Fix numeric width_bucket() to allow its first argument to be infinite.
tglsfdc Oct 8, 2020
7538708
Avoid gratuitous inaccuracy in numeric width_bucket().
tglsfdc Oct 8, 2020
f13f2e4
Fix typos in logical.c and reorderbuffer.c.
Oct 9, 2020
bed9075
Fix our Windows stat() emulation to handle file sizes > 4GB.
tglsfdc Oct 9, 2020
ed30b1a
plperl.h should #undef fstat along with stat and lstat.
tglsfdc Oct 9, 2020
fe27009
Recognize network-failure errnos as indicating hard connection loss.
tglsfdc Oct 10, 2020
c94cfb3
Minor cleanup for win32stat.c.
tglsfdc Oct 10, 2020
961e07b
Minor cleanup for win32stat.c.
tglsfdc Oct 10, 2020
eeb01eb
Remove pointless error-code checking in pg_dump/parallel.c.
tglsfdc Oct 10, 2020
85d08b8
Band-aid new postgres_fdw test case to remove error text dependency.
tglsfdc Oct 10, 2020
80f8eb7
Use perfect hash for NFC and NFKC Unicode Normalization quick check
michaelpq Oct 11, 2020
f5c1167
For ppc gcc, implement 64-bit compare_exchange and fetch_add with asm.
nmisch Oct 12, 2020
88ea7a1
Choose ppc compare_exchange constant path for more operand values.
nmisch Oct 12, 2020
3fb6765
Adjust cycle detection examples and tests
petere Oct 12, 2020
f0f13a3
Fix estimates for ModifyTable paths without RETURNING.
macdice Oct 12, 2020
e578c17
Fix compilation warning in unicode_norm.c
michaelpq Oct 12, 2020
fcd1132
Minor cleanup for win32stat.c.
tglsfdc Oct 12, 2020
397ea90
Fix memory leak when guc.c decides a setting can't be applied now.
tglsfdc Oct 12, 2020
78c0b6e
Re-allow testing of GiST buffered builds.
tglsfdc Oct 12, 2020
371668a
Fix GiST buffering build to work when there are included columns.
tglsfdc Oct 12, 2020
8fccf75
Add tests for logical replication spilled stats.
Oct 13, 2020
323ae00
doc: Expand recursive query documentation
petere Oct 13, 2020
2050832
Fix the unstable output of tests added by commit 8fccf75834.
Oct 13, 2020
1375422
Create ResultRelInfos later in InitPlan, index them by RT index.
hlinnaka Oct 13, 2020
ae0f7b1
Paper over regression failures in infinite_recurse() on PPC64 Linux.
tglsfdc Oct 13, 2020
4e118fc
Correct error message
petere Oct 14, 2020
39b4a95
Use https for gnu.org links
petere Oct 14, 2020
178f2d5
Include result relation info in direct modify ForeignScan nodes.
hlinnaka Oct 14, 2020
a04daa9
Remove es_result_relation_info from EState.
hlinnaka Oct 14, 2020
b94109c
Make WL_POSTMASTER_DEATH level-triggered on kqueue builds.
macdice Oct 14, 2020
4e9821b
Restore replication protocol's duplicate command tags
alvherre Oct 14, 2020
564a410
doc: Mention that toast_tuple_target affects also column marked as Main.
MasaoFujii Oct 15, 2020
d7eb52d
Execute invalidation messages for each XLOG_XACT_INVALIDATIONS message
Oct 15, 2020
70516a1
Handle EACCES errors from kevent() better.
macdice Oct 15, 2020
73c381c
Add documentation link to attributes supported by Clang
petere Oct 15, 2020
110d817
Fixup some appendStringInfo and appendPQExpBuffer calls
david-rowley Oct 15, 2020
8176afd
Improve tab-completion for FETCH/MOVE.
MasaoFujii Oct 15, 2020
86dba33
Replace calls of htonl()/ntohl() with pg_bswap.h for GSSAPI encryption
michaelpq Oct 15, 2020
7f47088
Fix query in new test to check tables are synced
alvherre Oct 15, 2020
c5b097f
Refactor code for cross-partition updates to a separate function.
hlinnaka Oct 15, 2020
b05fe7b
Review logical replication tablesync code
alvherre Oct 15, 2020
2203ede
Install pg_isolation_regress and isolationtester
alvherre Oct 15, 2020
85adb5e
Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls
alvherre Oct 15, 2020
93f84d5
Revert "Remove pointless HeapTupleHeaderIndicatesMovedPartitions calls"
alvherre Oct 15, 2020
a97e85f
doc: improve description of synchronous_commit modes
bmomjian Oct 15, 2020
7255943
llvmjit: Also copy parameter / return value attributes from template …
anarazel Oct 15, 2020
3c0471b
pg_upgrade: generate check error for left-over new tablespace
bmomjian Oct 15, 2020
536de14
pg_upgrade: remove C99 compiler req. from commit 3c0471b5fd
bmomjian Oct 16, 2020
fe2a16d
llvmjit: Work around bug in LLVM 3.9 causing crashes after 72559438f92.
anarazel Oct 16, 2020
7fc1a81
postgres_fdw: Restructure connection retry logic.
MasaoFujii Oct 16, 2020
bc49f87
Doc: tweak column widths in synchronous-commit-matrix table.
tglsfdc Oct 16, 2020
02a75f8
Add missing error check in pgcrypto/crypt-md5.c.
tglsfdc Oct 16, 2020
ce0e97f
Sync our copy of the timezone library with IANA release tzcode2020c.
tglsfdc Oct 17, 2020
c4a803a
Update time zone data files to tzdata release 2020c.
tglsfdc Oct 17, 2020
5408498
Doc: caution against misuse of 'now' and related datetime literals.
tglsfdc Oct 17, 2020
7d00a6b
In libpq for Windows, call WSAStartup once and WSACleanup not at all.
tglsfdc Oct 17, 2020
929c69a
In pg_restore's dump_lo_buf(), work a little harder on error handling.
tglsfdc Oct 18, 2020
d5a9a66
Update the Winsock API version requested by libpq.
tglsfdc Oct 18, 2020
a90c950
Prevent overly large and NaN row estimates in relations
david-rowley Oct 18, 2020
ca2a12c
Fix potential memory leak in pgcrypto
michaelpq Oct 19, 2020
560d260
Change the docs for PARALLEL option of Vacuum.
Oct 19, 2020
afa0d53
Improve whitespace
petere Oct 19, 2020
26ec6b5
Avoid invalid alloc size error in shm_mq
petere Oct 19, 2020
f49b85d
Clean up code to resolve the "root target relation" in nodeModifyTable.c
hlinnaka Oct 19, 2020
6973533
Revise child-to-root tuple conversion map management.
hlinnaka Oct 19, 2020
fb5883d
Remove PartitionRoutingInfo struct.
hlinnaka Oct 19, 2020
b4d5b45
Update link for pllua
mhagander Oct 19, 2020
1a64c76
Fix doc for full text search distance operator.
hlinnaka Oct 19, 2020
c0bc4c6
Fix output of tsquery example in docs.
hlinnaka Oct 19, 2020
2a972e0
Fix TRUNCATE doc: ALTER SEQUENCE RESTART is now transactional.
hlinnaka Oct 19, 2020
c5f42da
Misc documentation fixes.
hlinnaka Oct 19, 2020
c8ab970
Fix list-munging bug that broke SQL function result coercions.
tglsfdc Oct 19, 2020
8e5793a
Fix connection string handling in src/bin/scripts/ programs.
tglsfdc Oct 19, 2020
03d51b7
Change the attribute name in pg_stat_replication_slots view.
Oct 20, 2020
bbb927b
Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion
alvherre Oct 20, 2020
19ae53c
Review format of code generated by PerfectHash.pm
michaelpq Oct 21, 2020
8a58347
Fix -Wcast-function-type warnings on Windows/MinGW
petere Oct 21, 2020
555eb1a
Remove obsolete ifdefs
petere Oct 21, 2020
8a21211
Remove the option to build thread_test.c outside configure.
tglsfdc Oct 21, 2020
831611b
Use fast checkpoint in PostgresNode::backup()
alvherre Oct 21, 2020
85c5428
Fix connection string handling in psql's \connect command.
tglsfdc Oct 21, 2020
e7c2b95
Optimize a few list_delete_ptr calls
david-rowley Oct 22, 2020
f8721bd
Use croak instead of die in Perl code when appropriate
petere Oct 22, 2020
866e24d
Extend amcheck to check heap pages.
robertmhaas Oct 22, 2020
94929f1
Clean up some unpleasant behaviors in psql's \connect command.
tglsfdc Oct 22, 2020
8bb0c97
Try to avoid a compiler warning about using fxid uninitialized.
robertmhaas Oct 22, 2020
3dfb194
Avoid premature de-doubling of quote marks in ECPG strings.
tglsfdc Oct 22, 2020
c16a1bb
Add documentation and tests for quote marks in ECPG literal queries.
tglsfdc Oct 22, 2020
c5054da
Sync our copy of the timezone library with IANA release tzcode2020d.
tglsfdc Oct 23, 2020
7d6d6bc
Update time zone data files to tzdata release 2020d.
tglsfdc Oct 23, 2020
783f0cc
Improve performance of Unicode {de,re}composition in the backend
michaelpq Oct 23, 2020
22b73d3
Fix initialization of es_result_relations in EvalPlanQualStart().
hlinnaka Oct 23, 2020
902b57c
doc: Remove reference to pre-8.2 pg_dump behaviour
hlinnaka Oct 23, 2020
83d727e
doc: Fix order of protocol messages in listing
petere Oct 23, 2020
87a174c
Fix broken XML formatting in EXPLAIN output for incremental sorts.
tglsfdc Oct 23, 2020
860593e
Fix portability issues in new amcheck test.
tglsfdc Oct 23, 2020
1b62d0f
Allow psql to re-use connection parameters after a connection loss.
tglsfdc Oct 23, 2020
321633e
Fix more portability issues in new amcheck code.
tglsfdc Oct 23, 2020
0b46e82
Add tab completion for ALTER TABLE .. FORCE ROW LEVEL SECURITY in psql
michaelpq Oct 24, 2020
2771fce
Fix issue with --enable-coverage and the new unicode {de,re}compositi…
michaelpq Oct 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 5 additions & 27 deletions src/test/thread/thread_test.c → config/thread_test.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* thread_test.c
* libc thread test program
* libc threading test program
*
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/test/thread/thread_test.c
* config/thread_test.c
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
Expand All @@ -20,12 +20,7 @@
*-------------------------------------------------------------------------
*/

#if !defined(IN_CONFIGURE) && !defined(WIN32)
#include "postgres.h"

/* we want to know what the native strerror does, not pg_strerror */
#undef strerror
#endif
/* We cannot use c.h, as port.h will not exist yet */

#include <stdio.h>
#include <stdlib.h>
Expand All @@ -36,6 +31,7 @@
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <pthread.h>

/* CYGWIN requires this for MAXHOSTNAMELEN */
#ifdef __CYGWIN__
Expand All @@ -47,25 +43,11 @@
#include <winsock2.h>
#endif


/* Test for POSIX.1c 2-arg sigwait() and fail on single-arg version */
#include <signal.h>
int sigwait(const sigset_t *set, int *sig);


#if !defined(ENABLE_THREAD_SAFETY) && !defined(IN_CONFIGURE) && !defined(WIN32)
int
main(int argc, char *argv[])
{
fprintf(stderr, "This PostgreSQL build does not support threads.\n");
fprintf(stderr, "Perhaps rerun 'configure' using '--enable-thread-safety'.\n");
return 1;
}
#else

/* This must be down here because this is the code that uses threads. */
#include <pthread.h>

#define TEMP_FILENAME_1 "thread_test.1"
#define TEMP_FILENAME_2 "thread_test.2"

Expand Down Expand Up @@ -119,14 +101,12 @@ main(int argc, char *argv[])
return 1;
}

#ifdef IN_CONFIGURE
/* Send stdout to 'config.log' */
close(1);
dup(5);
#endif

#ifdef WIN32
err = WSAStartup(MAKEWORD(1, 1), &wsaData);
err = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (err != 0)
{
fprintf(stderr, "Cannot start the network subsystem - %d**\nexiting\n", err);
Expand Down Expand Up @@ -455,5 +435,3 @@ func_call_2(void)
pthread_mutex_lock(&init_mutex); /* wait for parent to test */
pthread_mutex_unlock(&init_mutex);
}

#endif /* !ENABLE_THREAD_SAFETY && !IN_CONFIGURE */
17 changes: 10 additions & 7 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -16137,6 +16137,12 @@ esac
;;
esac

case " $LIBOBJS " in
*" win32stat.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
;;
esac


$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h

Expand Down Expand Up @@ -18986,23 +18992,21 @@ $as_echo_n "checking thread safety of required library functions... " >&6; }

_CFLAGS="$CFLAGS"
_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$LIBS $PTHREAD_LIBS"
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
$as_echo "maybe" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/test/thread on the target machine.
" >&5
$as_echo "$as_me: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/test/thread on the target machine.
" >&2;}
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "$srcdir/src/test/thread/thread_test.c"
#include "$srcdir/config/thread_test.c"
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Expand All @@ -19011,9 +19015,8 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "thread test program failed
This platform is not thread-safe. Check the file 'config.log' or compile
and run src/test/thread/thread_test for the exact reason.
Use --disable-thread-safety to disable thread safety." "$LINENO" 5
This platform is not thread-safe. Check the file 'config.log' for the
exact reason, or use --disable-thread-safety to disable thread safety." "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
Expand Down
11 changes: 5 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,7 @@ if test "$PORTNAME" = "win32"; then
AC_LIBOBJ(win32error)
AC_LIBOBJ(win32security)
AC_LIBOBJ(win32setlocale)
AC_LIBOBJ(win32stat)
AC_DEFINE([HAVE_SYMLINK], 1,
[Define to 1 if you have the `symlink' function.])
AC_CHECK_TYPES(MINIDUMP_TYPE, [pgac_minidump_type=yes], [pgac_minidump_type=no], [
Expand Down Expand Up @@ -2294,20 +2295,18 @@ AC_MSG_CHECKING([thread safety of required library functions])

_CFLAGS="$CFLAGS"
_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$LIBS $PTHREAD_LIBS"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[#include "$srcdir/src/test/thread/thread_test.c"]])],
[AC_LANG_SOURCE([[#include "$srcdir/config/thread_test.c"]])],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([thread test program failed
This platform is not thread-safe. Check the file 'config.log' or compile
and run src/test/thread/thread_test for the exact reason.
Use --disable-thread-safety to disable thread safety.])],
This platform is not thread-safe. Check the file 'config.log' for the
exact reason, or use --disable-thread-safety to disable thread safety.])],
[AC_MSG_RESULT(maybe)
AC_MSG_WARN([
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/test/thread on the target machine.
])])
CFLAGS="$_CFLAGS"
LIBS="$_LIBS"
Expand Down
2 changes: 2 additions & 0 deletions contrib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ SUBDIRS = \
lo \
ltree \
oid2name \
old_snapshot \
pageinspect \
passwordcheck \
pg_buffercache \
pg_freespacemap \
pg_prewarm \
pg_standby \
pg_stat_statements \
pg_surgery \
pg_trgm \
pgcrypto \
pgrowlocks \
Expand Down
7 changes: 5 additions & 2 deletions contrib/amcheck/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
MODULE_big = amcheck
OBJS = \
$(WIN32RES) \
verify_heapam.o \
verify_nbtree.o

EXTENSION = amcheck
DATA = amcheck--1.1--1.2.sql amcheck--1.0--1.1.sql amcheck--1.0.sql
DATA = amcheck--1.2--1.3.sql amcheck--1.1--1.2.sql amcheck--1.0--1.1.sql amcheck--1.0.sql
PGFILEDESC = "amcheck - function for verifying relation integrity"

REGRESS = check check_btree
REGRESS = check check_btree check_heap

TAP_TESTS = 1

ifdef USE_PGXS
PG_CONFIG = pg_config
Expand Down
30 changes: 30 additions & 0 deletions contrib/amcheck/amcheck--1.2--1.3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* contrib/amcheck/amcheck--1.2--1.3.sql */

-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION amcheck UPDATE TO '1.3'" to load this file. \quit

--
-- verify_heapam()
--
CREATE FUNCTION verify_heapam(relation regclass,
on_error_stop boolean default false,
check_toast boolean default false,
skip text default 'none',
startblock bigint default null,
endblock bigint default null,
blkno OUT bigint,
offnum OUT integer,
attnum OUT integer,
msg OUT text)
RETURNS SETOF record
AS 'MODULE_PATHNAME', 'verify_heapam'
LANGUAGE C;

-- Don't want this to be available to public
REVOKE ALL ON FUNCTION verify_heapam(regclass,
boolean,
boolean,
text,
bigint,
bigint)
FROM PUBLIC;
2 changes: 1 addition & 1 deletion contrib/amcheck/amcheck.control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# amcheck extension
comment = 'functions for verifying relation integrity'
default_version = '1.2'
default_version = '1.3'
module_pathname = '$libdir/amcheck'
relocatable = true
Loading