commit_msg
stringlengths 1
24.2k
| commit_hash
stringlengths 2
84
⌀ | project
stringlengths 2
40
| source
stringclasses 4
values | labels
int64 0
1
| repo_url
stringlengths 26
70
⌀ | commit_url
stringlengths 74
118
⌀ | commit_date
stringlengths 25
25
⌀ |
---|---|---|---|---|---|---|---|
Fix typo in comment
The function was renamed in 908e23473, but the comment never learned
about it.
| c99f876e9a1e2a9a04d02a8aaf046cd9125e9264 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/c99f876e9a1e2a9a04d02a8aaf046cd9125e9264 | 2016-11-14 17:31:35+01:00 |
doc: Improve wording and fix whitespace
| ae5ed75ed4a951c58ec6a76362241b6ac32be61c | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/ae5ed75ed4a951c58ec6a76362241b6ac32be61c | 2018-06-27 07:51:20+02:00 |
Remove unstable KNN SP-GiST test
6cae9d2c10 introduced test for NULL values in KNN SP-GiST. This test relies on
undetermined ordering showing different results on various platforms. This
commit removes that test. Will be replaced with better test later.
Discussion: https://postgr.es/m/6d51305e1159241cabee132f7efc7eff%40xs4all.nl
Backpatch-through: 12
| f5f084fc3ec516545d826e1e9b7ab4aabf612698 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/f5f084fc3ec516545d826e1e9b7ab4aabf612698 | 2019-09-20 01:46:49+03:00 |
libpq error message refactoring
libpq now contains a mix of error message strings that end with
newlines and don't end with newlines, due to some newer code paths
with new ways of passing errors around. This leads to confusion and
mistakes both during development and translation.
This adds new functions libpq_append_error() and
libpq_append_conn_error() that encapsulate common code paths for
producing error message strings. Notably, these functions append the
newline, so that the string appearing in the code does not end with a
newline. This makes (almost) all error message strings in libpq
uniform in this regard (and also consistent with how we handle it
outside of libpq code). (There are a few exceptions that are
difficult to fit into this scheme, but they are only a few.)
Reviewed-by: Alvaro Herrera <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/[email protected]
| 0873b2d354b9c73a69067c0afb92e35994adc47e | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/0873b2d354b9c73a69067c0afb92e35994adc47e | 2022-11-15 11:50:04+01:00 |
Add 'id' to Acknowledgments section
Per note from Erik Rijkers
Discussion: https://postgr.es/m/[email protected]
| fcea1e10904856bbc77b701a0195d0524b9705d6 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/fcea1e10904856bbc77b701a0195d0524b9705d6 | 2019-01-21 14:41:44-03:00 |
Acquire properly session-level lock on new index in REINDEX CONCURRENTLY
In the first transaction run for REINDEX CONCURRENTLY, a thinko in the
existing logic caused two session locks to be taken on the old index,
causing the session lock on the newly-created index to be missed. This
made possible concurrent DDL commands (like ALTER INDEX) on the new
index while REINDEX CONCURRENTLY was processing from the point where the
first internal transaction committed.
This issue has been discovered while digging into another bug.
Author: Michael Paquier
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 12
| 5d3500da72611018f2280d6a31e58ccdb4b16152 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/5d3500da72611018f2280d6a31e58ccdb4b16152 | 2019-10-23 15:04:48+09:00 |
Accept XML documents when xmloption = content, as required by SQL:2006+.
Previously we were using the SQL:2003 definition, which doesn't allow
this, but that creates a serious dump/restore gotcha: there is no
setting of xmloption that will allow all valid XML data. Hence,
switch to the 2006 definition.
Since libxml doesn't accept <!DOCTYPE> directives in the mode we
use for CONTENT parsing, the implementation is to detect <!DOCTYPE>
in the input and switch to DOCUMENT parsing mode. This should not
cost much, because <!DOCTYPE> should be close to the front of the
input if it's there at all. It's possible that this causes the
error messages for malformed input to be slightly different than
they were before, if said input includes <!DOCTYPE>; but that does
not seem like a big problem.
In passing, buy back a few cycles in parsing of large XML documents
by not doing strlen() of the whole input in parse_xml_decl().
Back-patch because dump/restore failures are not nice. This change
shouldn't break any cases that worked before, so it seems safe to
back-patch.
Chapman Flack (revised a bit by me)
Discussion: https://postgr.es/m/CAN-V+g-6JqUQEQZ55Q3toXEN6d5Ez5uvzL4VR+8KtvJKj31taw@mail.gmail.com
| 8d1dadb25bb522e09af7f141e9d78db5805d868c | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/8d1dadb25bb522e09af7f141e9d78db5805d868c | 2019-03-23 16:24:30-04:00 |
Replace last PushOverrideSearchPath() call with set_config_option().
The two methods don't cooperate, so set_config_option("search_path",
...) has been ineffective under non-empty overrideStack. This defect
enabled an attacker having database-level CREATE privilege to execute
arbitrary code as the bootstrap superuser. While that particular attack
requires v13+ for the trusted extension attribute, other attacks are
feasible in all supported versions.
Standardize on the combination of NewGUCNestLevel() and
set_config_option("search_path", ...). It is newer than
PushOverrideSearchPath(), more-prevalent, and has no known
disadvantages. The "override" mechanism remains for now, for
compatibility with out-of-tree code. Users should update such code,
which likely suffers from the same sort of vulnerability closed here.
Back-patch to v11 (all supported versions).
Alexander Lakhin. Reported by Alexander Lakhin.
Security: CVE-2023-2454
| 681d9e4621aac0a9c71364b6f54f00f6d8c4337f | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/681d9e4621aac0a9c71364b6f54f00f6d8c4337f | 2023-05-08 06:14:07-07:00 |
Fix incorrect logic for determining safe WindowAgg run conditions
The logic added in 9d9c02ccd to determine when a qual can be used as a
WindowClause run condition failed to correctly check for subqueries in the
qual. This was being done correctly for normal subquery qual pushdowns,
it's just that 9d9c02ccd failed to follow the lead on that.
This also fixes various other cases where transforming the qual into a
WindowClause run condition in the subquery should have been disallowed.
Bug: #17826
Reported-by: Anban Company
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 15, where 9d9c02ccd was introduced.
| eb7d043c9bbadb75a87385113c578f1b30e9d195 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/eb7d043c9bbadb75a87385113c578f1b30e9d195 | 2023-03-17 15:49:53+13:00 |
Fix memory leak in repeated SPGIST index scans.
spgendscan neglected to pfree all the memory allocated by spgbeginscan.
It's possible to get away with that in most normal queries, since the
memory is allocated in the executor's per-query context which is about
to get deleted anyway; but it causes severe memory leakage during
creation or filling of large exclusion-constraint indexes.
Also, document that amendscan is supposed to free what ambeginscan
allocates. The docs' lack of clarity on that point probably caused this
bug to begin with. (There is discussion of changing that API spec going
forward, but I don't think it'd be appropriate for the back branches.)
Per report from Bruno Wolff. It's been like this since the beginning,
so back-patch to all active branches.
In HEAD, also fix an independent leak caused by commit 2a6368343
(allocating memory during spgrescan instead of spgbeginscan, which
might be all right if it got cleaned up, but it didn't). And do a bit
of code beautification on that commit, too.
Discussion: https://postgr.es/m/[email protected]
| 696b0c5fd0a8765fe6dfd075a30be06b448fd615 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/696b0c5fd0a8765fe6dfd075a30be06b448fd615 | 2018-10-31 17:04:42-04:00 |
Fix memory leaks in pg_rewind. Several PQclear() calls were missing.
Originally reported by Vladimir Borodin in the pg_rewind github project,
patch by Michael Paquier.
| d7fd22a38ff48372c6813983317fc8d1e07fcf87 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/d7fd22a38ff48372c6813983317fc8d1e07fcf87 | 2015-07-27 20:38:44+03:00 |
AIX: Link the postgres executable with -Wl,-brtllib.
This allows PostgreSQL modules and their dependencies to have undefined
symbols, resolved at runtime. Perl module shared objects rely on that
in Perl 5.8.0 and later. This fixes the crash when PL/PerlU loads such
modules, as the hstore_plperl test suite does. Module authors can link
using -Wl,-G to permit undefined symbols; by default, linking will fail
as it has. Back-patch to 9.0 (all supported versions).
| bcd7c41206faf6d9654aa6e3766f87770d4fb305 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/bcd7c41206faf6d9654aa6e3766f87770d4fb305 | 2015-07-15 21:00:26-04:00 |
Fix memory leak when inserting tuple at relation creation for CTAS
The leak has been introduced by 763f2ed which has addressed the problem
for transient tables, and forgot CREATE TABLE AS which shares a similar
logic when receiving a new tuple to store into the newly-created
relation.
Author: Jeff Janes
Discussion: https://postgr.es/m/CAMkU=1xZXtz3mziPEPD2Fubbas4G2RWkZm5HHABtfKVcbu1=Sg@mail.gmail.com
| 414a9d3cf34c7aff1c63533df4c40ebb63bd0840 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/414a9d3cf34c7aff1c63533df4c40ebb63bd0840 | 2019-02-27 14:14:06+09:00 |
Acquire spinlock when updating 2PC slot data during logical decoding creation
The creation of a logical decoding context in CreateDecodingContext()
updates some data of its slot for two-phase transactions if enabled by
the caller, but the code forgot to acquire a spinlock when updating
these fields like any other code paths. This could lead to the read of
inconsistent data.
Oversight in a8fd13c.
Author: Sawada Masahiko
Discussion: https://postgr.es/m/CAD21AoAD8_fp47191LKuecjDd3DYhoQ4TaucFco1_TEr_jQ-Zw@mail.gmail.com
Backpatch-through: 15
| 5ad165d2c024ae2fdc0a5ddd17522d5c92d7aa1a | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/5ad165d2c024ae2fdc0a5ddd17522d5c92d7aa1a | 2023-01-12 13:40:33+09:00 |
Use a fd opened for read/write when syncing slots during startup.
Some operating systems, including the reporter's windows, return EBADFD
or similar when fsync() is invoked on a O_RDONLY file descriptor.
Unfortunately RestoreSlotFromDisk() does exactly that; which causes
failures after restarts in at least some scenarios.
If you hit the bug the error message will be something like
ERROR: could not fsync file "pg_replslot/$name/state": Bad file descriptor
Simply use O_RDWR instead of O_RDONLY when opening the relevant file
descriptor to fix the bug. Unfortunately I have no way of verifying the
fix, but we've seen similar problems in the past.
This bug goes back to 9.4 where slots were introduced. Backpatch
accordingly.
Reported-By: Patrice Drolet
Bug: #13143:
Discussion: [email protected]
| dfbaed459754e71e01bb0cc90a12802bba3f9786 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/dfbaed459754e71e01bb0cc90a12802bba3f9786 | 2015-04-28 00:12:38+02:00 |
Plug memory leak in index_get_partition
The list of indexes was being leaked when asked for an index that
doesn't have an index partition in the table partition. Not a common
case admittedly --and in most cases where it occurs, caller throws an
error anyway-- but worth fixing for cleanliness and in case any
third-party code is calling this function.
While at it, remove use of lfirst_oid() to obtain a value we already
have.
Author: Justin Pryzby <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Discussion: https://postgr.es/m/[email protected]
| 623644f02cbde7ad3812b201bd36213a206c3341 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/623644f02cbde7ad3812b201bd36213a206c3341 | 2020-11-06 22:52:16-03:00 |
Fix memory leak introduced in commit 7df159a620.
We memorize all internal and empty leaf pages in the 1st vacuum stage for
gist indexes. They are used in the 2nd stage, to delete all the empty
pages. There was a memory context page_set_context for this purpose, but
we never used it.
Reported-by: Amit Kapila
Author: Dilip Kumar
Reviewed-by: Amit Kapila
Backpatch-through: 12, where it got introduced
Discussion: https://postgr.es/m/CAA4eK1LGr+MN0xHZpJ2dfS8QNQ1a_aROKowZB+MPNep8FVtwAA@mail.gmail.com
| 70a6c37d524cc2c29712424785be3d9e2e62f484 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/70a6c37d524cc2c29712424785be3d9e2e62f484 | 2019-10-17 08:45:43+05:30 |
Prevent memory leaks associated with relcache rd_partcheck structures.
The original coding of generate_partition_qual() just copied the list
of predicate expressions into the global CacheMemoryContext, making it
effectively impossible to clean up when the owning relcache entry is
destroyed --- the relevant code in RelationDestroyRelation() only managed
to free the topmost List header :-(. This resulted in a session-lifespan
memory leak whenever a table partition's relcache entry is rebuilt.
Fortunately, that's not normally a large data structure, and rebuilds
shouldn't occur all that often in production situations; but this is
still a bug worth fixing back to v10 where the code was introduced.
To fix, put the cached expression tree into its own small memory context,
as we do with other complicated substructures of relcache entries.
Also, deal more honestly with the case that a partition has an empty
partcheck list; while that probably isn't a case that's very interesting
for production use, it's legal.
In passing, clarify comments about how partitioning-related relcache
data structures are managed, and add some Asserts that we're not leaking
old copies when we overwrite these data fields.
Amit Langote and Tom Lane
Discussion: https://postgr.es/m/[email protected]
| 5f1433ac5e7f943b29ef01266b6b8fc915e6b917 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/5f1433ac5e7f943b29ef01266b6b8fc915e6b917 | 2019-04-13 13:22:26-04:00 |
Remove memory leak protection from Gather and Gather Merge nodes.
Before commit 6b65a7fe62e129d5c2b85cd74d6a91d8f7564608, tqueue.c could
perform tuple remapping and thus leak memory, which is why commit
af33039317ddc4a0e38a02e2255c2bf453115fd2 made TupleQueueReaderNext
run in a short-lived context. Now, however, tqueue.c has been reduced
to a shadow of its former self, and there shouldn't be any chance of
leaks any more. Accordingly, remove some tuple copying and memory
context manipulation to speed up processing.
Patch by me, reviewed by Amit Kapila. Some testing by Rafia Sabih.
Discussion: http://postgr.es/m/CAA4eK1LSDydwrNjmYSNkfJ3ZivGSWH9SVswh6QpNzsMdj_oOQA@mail.gmail.com
| 9f4992e2a9939a4c3d560c2ac58067861ee0029a | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/9f4992e2a9939a4c3d560c2ac58067861ee0029a | 2017-12-04 10:33:09-05:00 |
Add 'tap_tests' flag in config_default.pl
This makes the flag more visible for testers using the default file as a
template, increasing the likelyhood that the test suite will be run.
Also have the flag be displayed in the fake "configure" output, if set.
This patch is two new lines only, but perltidy decides to shift things
around which makes it appear a bit bigger.
Author: Michaël Paquier
Reviewed-by: Craig Ringer
Discussion: https://www.postgresql.org/message-id/CAB7nPqRet6UAP2APhZAZw%3DVhJ6w-Q-gGLdZkrOqFgd2vc9-ZDw%40mail.gmail.com
| 52fe6f4e02f89f6230994988af9abc23b332b83e | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/52fe6f4e02f89f6230994988af9abc23b332b83e | 2016-03-04 12:59:47-03:00 |
Reset, not recreate, execGrouping.c style hashtables.
This uses the facility added in the preceding commit to fix
performance issues caused by rebuilding the hashtable (with its
comparator expression being the most expensive bit), after every
reset. That's especially important when the comparator is JIT
compiled.
Bug: #15592 #15486
Reported-By: Jakub Janeček, Dmitry Marakasov
Author: Andres Freund
Discussion:
https://postgr.es/m/[email protected]
https://postgr.es/m/[email protected]
Backpatch: 11, where I broke this in bf6c614a2f2c5
| 356687bd825e5ca7230d43c1bffe7a59ad2e77bd | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/356687bd825e5ca7230d43c1bffe7a59ad2e77bd | 2019-02-09 00:35:57-08:00 |
Fix memory leak for hashing with nondeterministic collations.
Backpatch through 12, where nondeterministic collations were
introduced (5e1963fb76).
Backpatch-through: 12
| edf12e7bbd0f5cf6b3c4f4d6b2dad8586b10dcc6 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/edf12e7bbd0f5cf6b3c4f4d6b2dad8586b10dcc6 | 2022-12-01 11:26:32-08:00 |
Fix test_decoding's handling of nonexistant columns in old tuple versions.
test_decoding used fastgetattr() to extract column values. That's wrong
when decoding updates and deletes if a table's replica identity is set
to FULL and new columns have been added since the old version of the
tuple was created. Due to the lack of a crosscheck with the datum's
natts values an invalid value will be output, leading to errors or
worse.
Bug: #13470
Reported-By: Krzysztof Kotlarski
Discussion: [email protected]
Backpatch to 9.4, where the feature, including the bug, was added.
| d47a1136e441cebe7ae7fe72d70eb8ce278d5cd6 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/d47a1136e441cebe7ae7fe72d70eb8ce278d5cd6 | 2015-06-27 18:49:00+02:00 |
Add %P to log_line_prefix for parallel group leader
This is useful for monitoring purposes with log parsing. Similarly to
pg_stat_activity, the leader's PID is shown only for active parallel
workers, minimizing the log footprint for the leaders as the equivalent
shared memory field is set as long as a backend is alive.
Author: Justin Pryzby
Reviewed-by: Álvaro Herrera, Michael Paquier, Julien Rouhaud, Tom Lane
Discussion: https://postgr.es/m/[email protected]
| b8fdee7d0ca8bd2165d46fb1468f75571b706a01 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/b8fdee7d0ca8bd2165d46fb1468f75571b706a01 | 2020-08-03 13:38:48+09:00 |
Disallow NULLS NOT DISTINCT indexes for primary keys
A unique index which is created with non-distinct NULLS cannot be
used for backing a primary key constraint. Make sure to disallow
such table alterations and teach pg_dump to drop the non-distinct
NULLS clause on indexes where this has been set.
Bug: 17720
Reported-by: Reiner Peterke <[email protected]>
Reviewed-by: Peter Eisentraut <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/[email protected]
| d9595232579a3a9fadf4ce0b4cd58c1a3fc3b2f7 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/d9595232579a3a9fadf4ce0b4cd58c1a3fc3b2f7 | 2023-02-24 11:09:50+01:00 |
Fix some memory leaks and improve restricted token handling on Windows
The leaks have been detected by a Coverity run on Windows. No backpatch
is done as the leaks are minor.
While on it, make restricted token creation more consistent in its error
handling by logging an error instead of a warning if missing
advapi32.dll, which was missing in the NT4 days. Any modern platform
should have this DLL around. Now, if the library is not there, an error
is still reported back to the caller, and nothing is done do there is no
behavior change done in this commit.
Author: Ranier Vilela
Discussion: https://postgr.es/m/CAEudQApa9MG0foPkgPX87fipk=vhnF2Xfg+CfUyR08h4R7Mywg@mail.gmail.com
| 10a525230fb18331dbcfd6a4a7248d76f55c331c | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/10a525230fb18331dbcfd6a4a7248d76f55c331c | 2020-01-27 11:02:05+09:00 |
Fix memory leak and inefficiency in CREATE DATABASE ... STRATEGY WAL_LOG
RelationCopyStorageUsingBuffer() did not free the strategies used to access
the source / target relation. They memory was released at the end of the
transaction, but when using a template database with a lot of relations, the
temporary leak can become big prohibitively big.
RelationCopyStorageUsingBuffer() acquired the buffer for the target relation
with RBM_NORMAL, therefore requiring a read of a block guaranteed to be
zero. Use RBM_ZERO_AND_LOCK instead.
Reviewed-by: Robert Haas <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch: 15-, where STRATEGY WAL_LOG was introduced
| 5df319f3d55d09fadb4f7e4b58c5b476a3aeceb4 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/5df319f3d55d09fadb4f7e4b58c5b476a3aeceb4 | 2023-03-20 21:57:40-07:00 |
Improve memory handling across SQL-callable backup functions
Since pg_backup_start() and pg_backup_stop() exist, the tablespace map
data and the backup state data (backup_label string until 7d70809) have
been allocated in the TopMemoryContext. This approach would cause
memory leaks in the session calling these functions if failures happen
before pg_backup_stop() ends, leaking more memory on repeated failures.
Both things need little memory so that would not be really noticeable
for most users, except perhaps connection poolers with long-lived
connections able to trigger backup failures with these functions.
This commit improves the logic in this area by not allocating anymore
the backup-related data that needs to travel across the SQL-callable
backup functions in TopMemoryContext, by using instead a dedicated
memory context child of TopMemoryContext. The memory context is created
in pg_backup_start() and deleted when finishing pg_backup_stop(). In
the event of an in-flight failure, this memory context gets reset in the
follow-up pg_backup_start() call, so as we are sure that only one run
worth of data is leaked at any time. Some cleanup was already done for
the backup data on a follow-up call of pg_backup_start(), but using a
memory context makes the whole simpler.
BASE_BACKUP commands are executed in isolation, relying on the memory
context created for replication commands, hence these do not need such
an extra logic.
Author: Bharath Rupireddy
Reviewed-by: Robert Haas, Alvaro Herrera, Cary Huang, Michael Paquier
Discussion: https://postgr.es/m/CALj2ACXqvfKF2B0beQ=aJMdWnpNohmBPsRg=EDQj_6y1t2O8mQ@mail.gmail.com
| 6cc66197ff9aa34cc47486d7bf719f376f6f5ff8 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/6cc66197ff9aa34cc47486d7bf719f376f6f5ff8 | 2022-10-22 11:54:02+09:00 |
Fix memory leak in GIN index scans.
The code had a query-lifespan memory leak when encountering GIN entries
that have posting lists (rather than posting trees, ie, there are a
relatively small number of heap tuples containing this index key value).
With a suitable data distribution this could add up to a lot of leakage.
Problem seems to have been introduced by commit 36a35c550, so back-patch
to 9.4.
Julien Rouhaud
| f0e766bd7f77774075297526bd2da8f3de226c1f | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/f0e766bd7f77774075297526bd2da8f3de226c1f | 2016-04-15 00:02:26-04:00 |
Skip checkpoints, archiving on idle systems.
Some background activity (like checkpoints, archive timeout, standby
snapshots) is not supposed to happen on an idle system. Unfortunately
so far it was not easy to determine when a system is idle, which
defeated some of the attempts to avoid redundant activity on an idle
system.
To make that easier, allow to make individual WAL insertions as not
being "important". By checking whether any important activity happened
since the last time an activity was performed, it now is easy to check
whether some action needs to be repeated.
Use the new facility for checkpoints, archive timeout and standby
snapshots.
The lack of a facility causes some issues in older releases, but in my
opinion the consequences (superflous checkpoints / archived segments)
aren't grave enough to warrant backpatching.
Author: Michael Paquier, editorialized by Andres Freund
Reviewed-By: Andres Freund, David Steele, Amit Kapila, Kyotaro HORIGUCHI
Bug: #13685
Discussion:
https://www.postgresql.org/message-id/[email protected]
https://www.postgresql.org/message-id/CAB7nPqQcPqxEM3S735Bd2RzApNqSNJVietAC=6kfkYv_45dKwA@mail.gmail.com
Backpatch: -
| 6ef2eba3f57f17960b7cd4958e18aa79e357de2f | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/6ef2eba3f57f17960b7cd4958e18aa79e357de2f | 2016-12-22 11:31:50-08:00 |
Fix memory leak when guc.c decides a setting can't be applied now.
The prohibitValueChange code paths in set_config_option(), which
are executed whenever we re-read a PGC_POSTMASTER variable from
postgresql.conf, neglected to free anything before exiting. Thus
we'd leak the proposed new value of a PGC_STRING variable, as noted
by BoChen in bug #16666. For all variable types, if the check hook
creates an "extra" chunk, we'd also leak that.
These are malloc not palloc chunks, so there is no mechanism for
recovering the leaks before process exit. Fortunately, the values
are typically not very large, meaning you'd have to go through an
awful lot of SIGHUP configuration-reload cycles to make the leakage
amount to anything. Still, for a long-lived postmaster process it
could potentially be a problem.
Oversight in commit 2594cf0e8. Back-patch to all supported branches.
Discussion: https://postgr.es/m/[email protected]
| 397ea901e85b83e6381a0edeba7a45d794063569 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/397ea901e85b83e6381a0edeba7a45d794063569 | 2020-10-12 13:31:24-04:00 |
Acquire ProcArrayLock exclusively in ProcArrayClearTransaction.
This corrects an oversight by me in 20729324078, which made
ProcArrayClearTransaction() increment xactCompletionCount. That requires an
exclusive lock, obviously.
There's other approaches that avoid the exclusive acquisition, but given that a
2PC commit is fairly heavyweight, it doesn't seem worth doing so. I've not been
able to measure a performance difference, unsurprisingly. I did add a
comment documenting that we could do so, should it ever become a bottleneck.
Reported-By: Tom Lane <[email protected]>
Author: Andres Freund <[email protected]>
Discussion: https://postgr.es/m/[email protected]
| 1fe1f42e3e85279e1cb8b004b3b076a04bde4cee | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/1fe1f42e3e85279e1cb8b004b3b076a04bde4cee | 2020-08-19 18:19:52-07:00 |
Flush Memoize cache when non-key parameters change, take 2
It's possible that a subplan below a Memoize node contains a parameter
from above the Memoize node. If this parameter changes then cache entries
may become out-dated due to the new parameter value.
Previously Memoize was mistakenly not aware of this. We fix this here by
flushing the cache whenever a parameter that's not part of the cache
key changes.
Bug: #17213
Reported by: Elvis Pranskevichus
Author: David Rowley
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 14, where Memoize was added
| 411137a429210e432f923264a8e313a9872910ca | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/411137a429210e432f923264a8e313a9872910ca | 2021-11-24 23:29:14+13:00 |
AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS.
We make each AIX shared library export all globals found in .o files
that originate in the library. That doesn't include symbols acquired by
-lpgcommon_shlib. That is good on average, but it became a problem for
libpq when commit e6afa8918c461c1dd80c5063a950518fa4e950cd moved five
official libpq API symbols into src/common. Fix this by implementing
the SHLIB_EXPORTS mechanism for AIX, so affected libraries export the
same symbols that they export on Linux. This reintroduces symbols
pg_encoding_to_char, pg_utf_mblen, pg_char_to_encoding,
pg_valid_server_encoding, and pg_valid_server_encoding_id. Back-patch
to v13, where the aforementioned commit first appeared. While a minor
release is usually the wrong time to add or remove symbol exports in
libpq or libecpg, we should expect users to want each documented symbol.
Tony Reix
Discussion: https://postgr.es/m/PR3PR02MB6396742E2FC3E77D37A920BC86C79@PR3PR02MB6396.eurprd02.prod.outlook.com
| 8670b9b999adb66e2e063225496962763c4c28de | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/8670b9b999adb66e2e063225496962763c4c28de | 2021-09-06 11:27:59-07:00 |
Add Boolean node
Before, SQL-level boolean constants were represented by a string with
a cast, and internal Boolean values in DDL commands were usually
represented by Integer nodes. This takes the place of both of these
uses, making the intent clearer and having some amount of type safety.
Reviewed-by: Pavel Stehule <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/[email protected]
| 941460fcf731a32e6a90691508d5cfa3d1f8eeaf | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/941460fcf731a32e6a90691508d5cfa3d1f8eeaf | 2022-01-14 10:46:49+01:00 |
Fix handling of dropped columns in logical replication
The relation attribute map was not initialized for dropped columns,
leading to errors later on.
Author: Petr Jelinek <[email protected]>
Reported-by: Scott Milliken <[email protected]>
Bug: #14769
| 0e58455dd48ca9cbc9987c47b8297d10f1c307b0 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/0e58455dd48ca9cbc9987c47b8297d10f1c307b0 | 2017-08-07 10:28:35-04:00 |
Fix misuse of an integer as a bool.
pgtls_read_pending is declared to return bool, but what the underlying
SSL_pending function returns is a count of available bytes.
This is actually somewhat harmless if we're using C99 bools, but in
the back branches it's a live bug: if the available-bytes count happened
to be a multiple of 256, it would get converted to a zero char value.
On machines where char is signed, counts of 128 and up could misbehave
as well. The net effect is that when using SSL, libpq might block
waiting for data even though some has already been received.
Broken by careless refactoring in commit 4e86f1b16, so back-patch
to 9.5 where that came in.
Per bug #15802 from David Binderman.
Discussion: https://postgr.es/m/[email protected]
| ddf927fb13471bec0cc76794eaf552df8a1178fb | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/ddf927fb13471bec0cc76794eaf552df8a1178fb | 2019-05-13 10:53:19-04:00 |
NLS: Put list of available languages into LINGUAS files
This moves the list of available languages from nls.mk into a separate
file called po/LINGUAS. Advantages:
- It keeps the parts notionally managed by programmers (nls.mk)
separate from the parts notionally managed by translators (LINGUAS).
- It's the standard practice recommended by the Gettext manual
nowadays.
- The Meson build system also supports this layout (and of course
doesn't know anything about our custom nls.mk), so this would enable
sharing the list of languages between the two build systems.
(The MSVC build system currently finds all po files by globbing, so it
is not affected by this change.)
Reviewed-by: Andres Freund <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/[email protected]
| 88dad06b47eb80f699211c9b0b7a1c6d9016ad19 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/88dad06b47eb80f699211c9b0b7a1c6d9016ad19 | 2022-07-13 07:51:43+02:00 |
Fix crash when pg_get_viewdef_name_ext() is passed a non-view relation.
Oversight in commit 976b24fb4.
Andreas Seltenreich
Report: <[email protected]>
| 8a8c6b53810026641a1e12f60f873a7bd3cea5e3 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/8a8c6b53810026641a1e12f60f873a7bd3cea5e3 | 2016-08-07 17:56:34-04:00 |
Put back stats-collector restarting code, removed accidentally.
Removed that code snippet accidentally in the archive_mode='always' patch.
Also, use varname-tags for archive_command in the docs.
Fujii Masao
| 4df132895016c6a99355776a8df284ff011a2e94 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/4df132895016c6a99355776a8df284ff011a2e94 | 2015-05-18 10:18:46+03:00 |
Fix bug in collecting total_latencies from all threads in pgbench.
This was broken in 1bc90f7a, which removed the thread-emulation. With modest
-j and -c settings the result were usually close enough that you wouldn't
notice it easily, but with a high enough thread count it would access
uninitialized memory and crash.
Per report from Andres Freund offlist.
| b2ed8edeecd715c8a23ae462da843578e5cde7f4 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/b2ed8edeecd715c8a23ae462da843578e5cde7f4 | 2015-07-28 11:30:23+03:00 |
Fix memory leak in Memoize cache key evaluation
When probing the Memoize cache to check if the current cache key values
exist in the cache, we perform an evaluation of the expressions making up
the cache key before probing the hash table for those values. This
operation could leak memory as it is possible that the cache key is an
expression which requires allocation of memory, as was the case in bug
17844.
Here we fix this by correctly switching to the per tuple context before
evaluating the cache expressions so that the memory is freed next time the
per tuple context is reset.
Bug: 17844
Reported-by: Alexey Ermakov
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 14, where Memoize was introduced
| 579ee5df14dfcf5213e502bb096121d2249167c2 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/579ee5df14dfcf5213e502bb096121d2249167c2 | 2023-03-20 13:28:47+13:00 |
Fix buffer overflow when parsing SCRAM verifiers in backend
Any authenticated user can overflow a stack-based buffer by changing the
user's own password to a purpose-crafted value. This often suffices to
execute arbitrary code as the PostgreSQL operating system account.
This fix is contributed by multiple folks, based on an initial analysis
from Tom Lane. This issue has been introduced by 68e61ee, so it was
possible to make use of it at authentication time. It became more
easily to trigger after ccae190 which has made the SCRAM parsing more
strict when changing a password, in the case where the client passes
down a verifier already hashed using SCRAM. Back-patch to v10 where
SCRAM has been introduced.
Reported-by: Alexander Lakhin
Author: Jonathan Katz, Heikki Linnakangas, Michael Paquier
Security: CVE-2019-10164
Backpatch-through: 10
| 09ec55b933091cb5b0af99978718cb3d289c71b6 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/09ec55b933091cb5b0af99978718cb3d289c71b6 | 2019-06-17 21:48:17+09:00 |
Cherry-pick security-relevant fixes from upstream imath library.
This covers alterations to buffer sizing and zeroing made between imath
1.3 and imath 1.20. Valgrind Memcheck identified the buffer overruns
and reliance on uninitialized data; their exploit potential is unknown.
Builds specifying --with-openssl are unaffected, because they use the
OpenSSL BIGNUM facility instead of imath. Back-patch to 9.0 (all
supported versions).
Security: CVE-2015-0243
| 8b59672d8d23ea4203cf2701d126a96edca5bdd6 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/8b59672d8d23ea4203cf2701d126a96edca5bdd6 | 2015-02-02 10:00:45-05:00 |
Again match pg_user_mappings to information_schema.user_mapping_options.
Commit 3eefc51053f250837c3115c12f8119d16881a2d7 claimed to make
pg_user_mappings enforce the qualifications user_mapping_options had
been enforcing, but its removal of a longstanding restriction left them
distinct when the current user is the subject of a mapping yet has no
server privileges. user_mapping_options emits no rows for such a
mapping, but pg_user_mappings includes full umoptions. Change
pg_user_mappings to show null for umoptions. Back-patch to 9.2, like
the above commit.
Reviewed by Tom Lane. Reported by Jeff Janes.
Security: CVE-2017-7547
| e568e1eee4650227170cf8c64eedb74bafd7d1f0 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/e568e1eee4650227170cf8c64eedb74bafd7d1f0 | 2017-08-07 07:09:28-07:00 |
Stabilize output of new regression test.
Per buildfarm, the output order of \dx+ isn't consistent across
locales. Apply NO_LOCALE to force C locale. There might be a
more localized way, but I'm not seeing it offhand, and anyway
there is nothing in this test module that particularly cares
about locales.
Security: CVE-2022-2625
| 71cac850d02f2ad46aca00d3852574bd48fb581a | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/71cac850d02f2ad46aca00d3852574bd48fb581a | 2022-08-08 12:16:01-04:00 |
Add 'logical_decoding_mode' GUC.
This enables streaming or serializing changes immediately in logical
decoding. This parameter is intended to be used to test logical decoding
and replication of large transactions for which otherwise we need to
generate the changes till logical_decoding_work_mem is reached.
This helps in reducing the timing of existing tests related to logical
replication of in-progress transactions and will help in writing tests for
for the upcoming feature for parallelly applying large in-progress
transactions.
Author: Shi yu
Reviewed-by: Sawada Masahiko, Shveta Mallik, Amit Kapila, Dilip Kumar, Kuroda Hayato, Kyotaro Horiguchi
Discussion: https://postgr.es/m/OSZPR01MB63104E7449DBE41932DB19F1FD1B9@OSZPR01MB6310.jpnprd01.prod.outlook.com
| 5de94a041ed7a51b571db2030ba87600c7fc6262 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/5de94a041ed7a51b571db2030ba87600c7fc6262 | 2022-12-26 08:58:16+05:30 |
Fix RelationBuildPartitionKey's processing of partition key expressions.
Failure to advance the list pointer while reading partition expressions
from a list results in invoking an input function with inappropriate data,
possibly leading to crashes or, with carefully crafted input, disclosure
of arbitrary backend memory.
Bug discovered independently by Álvaro Herrera and David Rowley.
This patch is by Álvaro but owes something to David's proposed fix.
Back-patch to v10 where the issue was introduced.
Security: CVE-2018-1052
| 3492a0af0bd37e7f23e27fd3f5537f414ee9ab9b | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/3492a0af0bd37e7f23e27fd3f5537f414ee9ab9b | 2018-02-05 10:37:30-05:00 |
Further patch rangetypes_selfuncs.c's statistics slot management.
Values in a STATISTIC_KIND_RANGE_LENGTH_HISTOGRAM slot are float8,
not of the type of the column the statistics are for.
This bug is at least partly the fault of sloppy specification comments
for get_attstatsslot()/free_attstatsslot(): the type OID they want is that
of the stavalues entries, not of the underlying column. (I double-checked
other callers and they seem to get this right.) Adjust the comments to be
more correct.
Per buildfarm.
Security: CVE-2017-7484
| da0759600664439238fe25fa84b1f0059bfdcdd6 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/da0759600664439238fe25fa84b1f0059bfdcdd6 | 2017-05-08 15:02:57-04:00 |
Absorb -D_USE_32BIT_TIME_T switch from Perl, if relevant.
Commit 3c163a7fc's original choice to ignore all #define symbols whose
names begin with underscore turns out to be too simplistic. On Windows,
some Perl installations are built with -D_USE_32BIT_TIME_T, and we must
absorb that or we get the wrong result for sizeof(PerlInterpreter).
This effectively re-reverts commit ef58b87df, which injected that symbol
in a hacky way, making it apply to all of Postgres not just PL/Perl.
More significantly, it did so on *all* 32-bit Windows builds, even when
the Perl build to be used did not select this option; so that it fails
to work properly with some newer Perl builds.
By making this change, we would be introducing an ABI break in 32-bit
Windows builds; but fortunately we have not used type time_t in any
exported Postgres APIs in a long time. So it should be OK, both for
PL/Perl itself and for third-party extensions, if an extension library
is built with a different _USE_32BIT_TIME_T setting than the core code.
Patch by me, based on research by Ashutosh Sharma and Robert Haas.
Back-patch to all supported branches, as commit 3c163a7fc was.
Discussion: https://postgr.es/m/CANFyU97OVQ3+Mzfmt3MhuUm5NwPU=-FtbNH5Eb7nZL9ua8=rcA@mail.gmail.com
| 5a5c2feca3fd858e70ea348822595547e6fa6c15 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/5a5c2feca3fd858e70ea348822595547e6fa6c15 | 2017-08-14 11:48:59-04:00 |
Add 'n' to list of possible values to pg_default_acl.defaclobjtype
This was missed in commit ab89e465cb20; backpatch to v10.
Author: Fabien Coelho <[email protected]>
Discussion: https://postgr.es/m/alpine.DEB.2.21.1807302243001.13230@lancre
| f6f8d55c4b47454f0e22bbabdc6a5711848b4931 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/f6f8d55c4b47454f0e22bbabdc6a5711848b4931 | 2018-08-03 16:45:08-04:00 |
Revert error-throwing wrappers for the printf family of functions.
This reverts commit 16304a013432931e61e623c8d85e9fe24709d9ba, except
for its changes in src/port/snprintf.c; as well as commit
cac18a76bb6b08f1ecc2a85e46c9d2ab82dd9d23 which is no longer needed.
Fujii Masao reported that the previous commit caused failures in psql on
OS X, since if one exits the pager program early while viewing a query
result, psql sees an EPIPE error from fprintf --- and the wrapper function
thought that was reason to panic. (It's a bit surprising that the same
does not happen on Linux.) Further discussion among the security list
concluded that the risk of other such failures was far too great, and
that the one-size-fits-all approach to error handling embodied in the
previous patch is unlikely to be workable.
This leaves us again exposed to the possibility of the type of failure
envisioned in CVE-2015-3166. However, that failure mode is strictly
hypothetical at this point: there is no concrete reason to believe that
an attacker could trigger information disclosure through the supposed
mechanism. In the first place, the attack surface is fairly limited,
since so much of what the backend does with format strings goes through
stringinfo.c or psprintf(), and those already had adequate defenses.
In the second place, even granting that an unprivileged attacker could
control the occurrence of ENOMEM with some precision, it's a stretch to
believe that he could induce it just where the target buffer contains some
valuable information. So we concluded that the risk of non-hypothetical
problems induced by the patch greatly outweighs the security risks.
We will therefore revert, and instead undertake closer analysis to
identify specific calls that may need hardening, rather than attempt a
universal solution.
We have kept the portion of the previous patch that improved snprintf.c's
handling of errors when it calls the platform's sprintf(). That seems to
be an unalloyed improvement.
Security: CVE-2015-3166
| 0c071936e94c6859afb2ec8d2c8dddf7bcdab7ee | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/0c071936e94c6859afb2ec8d2c8dddf7bcdab7ee | 2015-05-19 18:14:52-04:00 |
Add "B" suffix for bytes to docs
6e7baa3227 and b06d8e58b5 added "B" as a valid suffix for
GUC_UNIT_BYTES but neglected to add it to the docs.
| 36e9d413a1d6928cd809d302d495fd6880a44b1e | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/36e9d413a1d6928cd809d302d495fd6880a44b1e | 2018-10-06 13:03:43-04:00 |
Add ALTER SUBSCRIPTION ... SKIP.
This feature allows skipping the transaction on subscriber nodes.
If incoming change violates any constraint, logical replication stops
until it's resolved. Currently, users need to either manually resolve the
conflict by updating a subscriber-side database or by using function
pg_replication_origin_advance() to skip the conflicting transaction. This
commit introduces a simpler way to skip the conflicting transactions.
The user can specify LSN by ALTER SUBSCRIPTION ... SKIP (lsn = XXX),
which allows the apply worker to skip the transaction finished at
specified LSN. The apply worker skips all data modification changes within
the transaction.
Author: Masahiko Sawada
Reviewed-by: Takamichi Osumi, Hou Zhijie, Peter Eisentraut, Amit Kapila, Shi Yu, Vignesh C, Greg Nancarrow, Haiying Tang, Euler Taveira
Discussion: https://postgr.es/m/CAD21AoDeScrsHhLyEPYqN3sydg6PxAPVBboK=30xJfUVihNZDA@mail.gmail.com
| 208c5d65bbd60e33e272964578cb74182ac726a8 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/208c5d65bbd60e33e272964578cb74182ac726a8 | 2022-03-22 07:11:19+05:30 |
ALTER TABLE .. FORCE ROW LEVEL SECURITY
To allow users to force RLS to always be applied, even for table owners,
add ALTER TABLE .. FORCE ROW LEVEL SECURITY.
row_security=off overrides FORCE ROW LEVEL SECURITY, to ensure pg_dump
output is complete (by default).
Also add SECURITY_NOFORCE_RLS context to avoid data corruption when
ALTER TABLE .. FORCE ROW SECURITY is being used. The
SECURITY_NOFORCE_RLS security context is used only during referential
integrity checks and is only considered in check_enable_rls() after we
have already checked that the current user is the owner of the relation
(which should always be the case during referential integrity checks).
Back-patch to 9.5 where RLS was added.
| 088c83363a11200f2225f279d4a5c6cc6f9db3d2 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/088c83363a11200f2225f279d4a5c6cc6f9db3d2 | 2015-10-04 21:05:08-04:00 |
Add --parallel option to vacuumdb command.
Commit 40d964ec99 allowed vacuum command to leverage multiple CPUs by
invoking parallel workers to process indexes. This commit provides a
'--parallel' option to specify the parallel degree used by vacuum command.
Author: Masahiko Sawada, with few modifications by me
Reviewed-by: Mahendra Singh and Amit Kapila
Discussion: https://postgr.es/m/CAD21AoDTPMgzSkV4E3SFo1CH_x50bf5PqZFQf4jmqjk-C03BWg@mail.gmail.com
| 47bc9ced0d0e96523e2c639c7066c9aede189ed7 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/47bc9ced0d0e96523e2c639c7066c9aede189ed7 | 2020-01-29 11:08:50+05:30 |
Fix buffer overrun after incomplete read in pullf_read_max().
Most callers pass a stack buffer. The ensuing stack smash can crash the
server, and we have not ruled out the viability of attacks that lead to
privilege escalation. Back-patch to 9.0 (all supported versions).
Marko Tiikkaja
Security: CVE-2015-0243
| 1dc75515868454c645ded22d38054ec693e23ec6 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/1dc75515868454c645ded22d38054ec693e23ec6 | 2015-02-02 10:00:45-05:00 |
adminpack: Revoke EXECUTE on pg_logfile_rotate()
In 9.6, we moved a number of functions over to using the GRANT system to
control access instead of having hard-coded superuser checks.
As it turns out, adminpack was creating another function in the catalog
for one of those backend functions where the superuser check was
removed, specifically pg_rotate_logfile(), but it didn't get the memo
about having to REVOKE EXECUTE on the alternative-name function
(pg_logfile_rotate()), meaning that in any installations with adminpack
on 9.6 and higher, any user is able to run the pg_logfile_rotate()
function, which then calls pg_rotate_logfile() and rotates the logfile.
Fix by adding a new version of adminpack (1.1) which handles the REVOKE.
As this function should have only been available to the superuser, this
is a security issue, albeit a minor one.
In HEAD, move the changes implemented for adminpack up to be adminpack
2.0 instead of 1.1.
Security: CVE-2018-1115
| 7b347409fa2776fbaa4ec9c57365f48a2bbdb80c | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/7b347409fa2776fbaa4ec9c57365f48a2bbdb80c | 2018-05-07 10:10:33-04:00 |
port/snprintf(): fix overflow and do padding
Prevent port/snprintf() from overflowing its local fixed-size
buffer and pad to the desired number of digits with zeros, even
if the precision is beyond the ability of the native sprintf().
port/snprintf() is only used on systems that lack a native
snprintf().
Reported by Bruce Momjian. Patch by Tom Lane. Backpatch to all
supported versions.
Security: CVE-2015-0242
| 29725b3db67ad3f09da1a7fb6690737d2f8d6c0a | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/29725b3db67ad3f09da1a7fb6690737d2f8d6c0a | 2015-02-02 10:00:45-05:00 |
Add -wnet to SP invocations
This causes a warning when accidentally backpatching an XML-style
empty-element tag like <xref linkend="abc"/>.
| 9a8d3c4eeaf34966056a41a263c6e2ca4d5e4012 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/9a8d3c4eeaf34966056a41a263c6e2ca4d5e4012 | 2017-11-09 17:06:32-05:00 |
Reset plan->row_security_env and planUserId
In the plancache, we check if the environment we planned the query under
has changed in a way which requires us to re-plan, such as when the user
for whom the plan was prepared changes and RLS is being used (and,
therefore, there may be different policies to apply).
Unfortunately, while those values were set and checked, they were not
being reset when the query was re-planned and therefore, in cases where
we change role, re-plan, and then change role again, we weren't
re-planning again. This leads to potentially incorrect policies being
applied in cases where role-specific policies are used and a given query
is planned under one role and then executed under other roles, which
could happen under security definer functions or when a common user and
query is planned initially and then re-used across multiple SET ROLEs.
Further, extensions which made use of CopyCachedPlan() may suffer from
similar issues as the RLS-related fields were not properly copied as
part of the plan and therefore RevalidateCachedQuery() would copy in the
current settings without invalidating the query.
Fix by using the same approach used for 'search_path', where we set the
correct values in CompleteCachedPlan(), check them early on in
RevalidateCachedQuery() and then properly reset them if re-planning.
Also, copy through the values during CopyCachedPlan().
Pointed out by Ashutosh Bapat. Reviewed by Michael Paquier.
Back-patch to 9.5 where RLS was introduced.
Security: CVE-2016-2193
| 86ebf30fd6d8964bbd5d48db053b0a7ff709a0d7 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/86ebf30fd6d8964bbd5d48db053b0a7ff709a0d7 | 2016-03-28 09:03:20-04:00 |
Adapt src/test/ldap/t/001_auth.pl to work with openldap 2.5.
ldapsearch's deprecated -h/-p arguments were removed, need to use -H now -
which has been around for over 20 years.
As perltidy insists on reflowing the parameters anyway, change order and
"phrasing" to yield a less confusing layout (per suggestion from Tom Lane).
Discussion: https://postgr.es/m/[email protected]
Backpatch: 11-, where the tests were added.
| 984f460e2f29e7ba9174cabb9f43a0d1dce543bf | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/984f460e2f29e7ba9174cabb9f43a0d1dce543bf | 2021-10-19 10:14:49-07:00 |
Accept flex > 2.5.x in configure.
Per buildfarm member anchovy, 2.6.0 exists in the wild now.
Hopefully it works with Postgres; if not, we'll have to do something
about that, but in any case claiming it's "too old" is pretty silly.
| 32f15d05c80044335f97347b5406f6736c06a033 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/32f15d05c80044335f97347b5406f6736c06a033 | 2015-11-18 17:45:05-05:00 |
Make relation-enumerating operations be security-restricted operations.
When a feature enumerates relations and runs functions associated with
all found relations, the feature's user shall not need to trust every
user having permission to create objects. BRIN-specific functionality
in autovacuum neglected to account for this, as did pg_amcheck and
CLUSTER. An attacker having permission to create non-temp objects in at
least one schema could execute arbitrary SQL functions under the
identity of the bootstrap superuser. CREATE INDEX (not a
relation-enumerating operation) and REINDEX protected themselves too
late. This change extends to the non-enumerating amcheck interface.
Back-patch to v10 (all supported versions).
Sergey Shinderuk, reviewed (in earlier versions) by Alexander Lakhin.
Reported by Alexander Lakhin.
Security: CVE-2022-1552
| a117cebd638dd02e5c2e791c25e43745f233111b | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/a117cebd638dd02e5c2e791c25e43745f233111b | 2022-05-09 08:35:08-07:00 |
Add BSD authentication method.
Create a "bsd" auth method that works the same as "password" so far as
clients are concerned, but calls the BSD Authentication service to
check the password. This is currently only available on OpenBSD.
Marisa Emerson, reviewed by Thomas Munro
| 34c33a1f00259ce5e3e1d1b4a784037adfca6057 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/34c33a1f00259ce5e3e1d1b4a784037adfca6057 | 2016-04-08 13:51:54-04:00 |
Add 'basebackup_to_shell' contrib module.
As a demonstration of the sort of thing that can be done by adding a
custom backup target, this defines a 'shell' target which executes a
command defined by the system administrator. The command is executed
once for each tar archive generate by the backup and once for the
backup manifest, if any. Each time the command is executed, it
receives the contents of th file for which it is executed via standard
input.
The configured command can use %f to refer to the name of the archive
(e.g. base.tar, $TABLESPACE_OID.tar, backup_manifest) and %d to refer
to the target detail (pg_basebackup --target shell:DETAIL). A target
detail is required if %d appears in the configured command and
forbidden if it does not.
Patch by me, reviewed by Abhijit Menon-Sen.
Discussion: http://postgr.es/m/CA+TgmoaqvdT-u3nt+_kkZ7bgDAyqDB0i-+XOMmr5JN2Rd37hxw@mail.gmail.com
| c6306db24bd913375f99494e38ab315befe44e11 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/c6306db24bd913375f99494e38ab315befe44e11 | 2022-03-15 13:24:23-04:00 |
Add --exclude-database option to pg_dumpall
This option functions similarly to pg_dump's --exclude-table option, but
for database names. The option can be given once, and the argument can
be a pattern including wildcard characters.
Author: Andrew Dunstan.
Reviewd-by: Fabien Coelho and Michael Paquier
Discussion: https://postgr.es/m/[email protected]
| f092de0503cd77a8463e7089c249d5e0586a120b | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/f092de0503cd77a8463e7089c249d5e0586a120b | 2019-03-01 10:47:44-05:00 |
ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION
At present, if we want to update publications in a subscription, we
can use SET PUBLICATION. However, it requires supplying all
publications that exists and the new publications. If we want to add
new publications, it's inconvenient. The new syntax only supplies the
new publications. When the refresh is true, it only refreshes the new
publications.
Author: Japin Li <[email protected]>
Author: Bharath Rupireddy <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/MEYP282MB166939D0D6C480B7FBE7EFFBB6BC0@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
| 82ed7748b710e3ddce3f7ebc74af80fe4869492f | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/82ed7748b710e3ddce3f7ebc74af80fe4869492f | 2021-04-06 10:44:26+02:00 |
A collection of small fixes for logical replication.
* Be sure to reset the launcher's pid (LogicalRepCtx->launcher_pid) to 0
even when the launcher emits an error.
* Declare ApplyLauncherWakeup() as a static function because it's called
only in launcher.c.
* Previously IsBackendPId() was used to check whether the launcher's pid
was valid. IsBackendPid() was necessary because there was the bug where
the launcher's pid was not reset to 0. But now it's fixed, so IsBackendPid()
is not necessary and this patch removes it.
Author: Masahiko Sawada
Reviewed-by: Kyotaro Horiguchi
Reported-by: Fujii Masao
Discussion: http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=ZOSY3kX_Pna9R9SA@mail.gmail.com
| 280c53ecfbcad442c4b5eaab4cc3e65408f486eb | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/280c53ecfbcad442c4b5eaab4cc3e65408f486eb | 2017-04-19 02:16:34+09:00 |
Accept flex > 2.5.x on Windows, too.
Commit 32f15d05c fixed this in configure, but missed the similar check
in the MSVC scripts.
Michael Paquier, per report from Victor Wagner
| 9c779c49e39372c21214ad2dc5864dd78caee82d | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/9c779c49e39372c21214ad2dc5864dd78caee82d | 2015-12-10 10:19:13-05:00 |
Acquire locks on views in AcquirePlannerLocks, too.
Commit 47bb9db75 taught AcquireExecutorLocks to re-acquire locks
on views using data from their RTE_SUBQUERY replacements, but
it now seems like we should make AcquirePlannerLocks do the same.
In this way, if a view has been redefined, we will notice that
a bit earlier while checking validity of a cached plan and thereby
avoid some wasted work.
Report and patch by Amit Langote.
Discussion: https://postgr.es/m/CA+HiwqH0xZOQ+GQAdKeckY1R4NOeHdzhtfxkAMJLSchpapNk5w@mail.gmail.com
| 65eb2d00c6c1bab29db9fa6575185a40d823fe9d | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/65eb2d00c6c1bab29db9fa6575185a40d823fe9d | 2023-04-05 15:56:07-04:00 |
Add 'active_in' column to pg_replication_slots.
Right now it is visible whether a replication slot is active in any
session, but not in which. Adding the active_in column, containing the
pid of the backend having acquired the slot, makes it much easier to
associate pg_replication_slots entries with the corresponding
pg_stat_replication/pg_stat_activity row.
This should have been done from the start, but I (Andres) dropped the
ball there somehow.
Author: Craig Ringer, revised by me Discussion:
CAMsr+YFKgZca5_7_ouaMWxA5PneJC9LNViPzpDHusaPhU9pA7g@mail.gmail.com
| d811c037cea2e929ee5823aab6e1bca0df8be245 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/d811c037cea2e929ee5823aab6e1bca0df8be245 | 2015-04-21 11:51:06+02:00 |
A collection of small fixes for the SCRAM patch.
* Add required #includes for htonl. Per buildfarm members pademelon/gaur.
* Remove unnecessary "#include <utils/memutils>".
* Fix checking for empty string in pg_SASL_init. (Reported by Peter
Eisentraut and his compiler)
* Move code in pg_SASL_init to match the recent changes (commit ba005f193d)
to pg_fe_sendauth() function, where it's copied from.
* Return value of malloc() was not checked for NULL in
scram_SaltedPassword(). Fix by avoiding the malloc().
| 95c1dbcdfffcc3a77e693c3c2759e26a01f465c8 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/95c1dbcdfffcc3a77e693c3c2759e26a01f465c8 | 2017-03-07 19:00:22+02:00 |
Account for catalog snapshot in PGXACT->xmin updates.
The CatalogSnapshot was not plugged into SnapshotResetXmin()'s accounting
for whether MyPgXact->xmin could be cleared or advanced. In normal
transactions this was masked by the fact that the transaction snapshot
would be older, but during backend startup and certain utility commands
it was possible to re-use the CatalogSnapshot after MyPgXact->xmin had
been cleared, meaning that recently-deleted rows could be pruned even
though this snapshot could still see them, causing unexpected catalog
lookup failures. This effect appears to be the explanation for a recent
failure on buildfarm member piculet.
To fix, add the CatalogSnapshot to the RegisteredSnapshots heap whenever
it is valid.
In the previous logic, it was possible for the CatalogSnapshot to remain
valid across waits for client input, but with this change that would mean
it delays advance of global xmin in cases where it did not before. To
avoid possibly causing new table-bloat problems with clients that sit idle
for long intervals, add code to invalidate the CatalogSnapshot before
waiting for client input. (When the backend is busy, it's unlikely that
the CatalogSnapshot would be the oldest snap for very long, so we don't
worry about forcing early invalidation of it otherwise.)
In passing, remove the CatalogSnapshotStale flag in favor of using
"CatalogSnapshot != NULL" to represent validity, as we do for the other
special snapshots in snapmgr.c. And improve some obsolete comments.
No regression test because I don't know a deterministic way to cause this
failure. But the stress test shown in the original discussion provokes
"cache lookup failed for relation 1255" within a few dozen seconds for me.
Back-patch to 9.4 where MVCC catalog scans were introduced. (Note: it's
quite easy to produce similar failures with the same test case in branches
before 9.4. But MVCC catalog scans were supposed to fix that.)
Discussion: <[email protected]>
| ffaa44cb559db332baeee7d25dedd74a61974203 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/ffaa44cb559db332baeee7d25dedd74a61974203 | 2016-11-15 15:55:35-05:00 |
AIX: Stop adding option -qsrcmsg.
With xlc v16.1.0, it causes internal compiler errors. With xlc versions
not exhibiting that bug, removing -qsrcmsg merely changes the compiler
error reporting format. Back-patch to 9.4 (all supported versions).
Discussion: https://postgr.es/m/[email protected]
| 5f3d271d03b249f5c80e3d3ca946f62a33d7862f | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/5f3d271d03b249f5c80e3d3ca946f62a33d7862f | 2019-10-12 00:21:47-07:00 |
Abort authentication if the client selected an invalid SASL mechanism.
Previously, the server would log an error, but then try to continue with
SCRAM-SHA-256 anyway.
Michael Paquier
Discussion: https://www.postgresql.org/message-id/CAB7nPqR0G5aF2_kc_LH29knVqwvmBc66TF5DicvpGVdke68nKw@mail.gmail.com
| 505b5d2f8672f13c98dd744a6d421da14f59cd39 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/505b5d2f8672f13c98dd744a6d421da14f59cd39 | 2017-05-25 08:50:47-04:00 |
Add "-c name=value" switch to initdb.
This option, or its long form --set, sets the GUC "name" to "value".
The setting applies in the bootstrap and standalone servers run by
initdb, and is also written into the generated postgresql.conf.
This can save an extra editing step when creating a new cluster,
but the real use-case is for coping with situations where the
bootstrap server fails to start due to environmental issues;
for example, if it's necessary to force huge_pages to off.
Discussion: https://postgr.es/m/[email protected]
| 3e51b278db6a4e2f50f3f6b9edc9667af1f934fd | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/3e51b278db6a4e2f50f3f6b9edc9667af1f934fd | 2023-03-22 13:48:44-04:00 |
Account for TOAST data while scheduling parallel dumps.
In parallel mode, pg_dump tries to order the table-data-dumping
jobs with the largest tables first. However, it was only
consulting the pg_class.relpages value to determine table size.
This ignores TOAST data, and so we could make poor scheduling
decisions in cases where some large tables are mostly TOASTed
data while others have very little. To fix, add in the relpages
value for the TOAST table as well.
This patch also fixes a potential integer-overflow issue that
could result in poor scheduling on machines where off_t is
only 32 bits wide. Such platforms are probably extinct in the
wild, but we do still nominally support them, so repair.
Per complaint from Hans Buschmann.
Discussion: https://postgr.es/m/[email protected]
| 65aaed22a849c0763f38f81338a1cad04ffc0e2c | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/65aaed22a849c0763f38f81338a1cad04ffc0e2c | 2021-12-06 13:23:07-05:00 |
ALTER TABLE ... ALTER COLUMN ... DROP EXPRESSION
Add an ALTER TABLE subcommand for dropping the generated property from
a column, per SQL standard.
Reviewed-by: Sergei Kornilov <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/2f7f1d9c-946e-0453-d841-4f38eb9d69b6%402ndquadrant.com
| f595117e24a79db6072979ab5a757431fd17232f | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/f595117e24a79db6072979ab5a757431fd17232f | 2020-01-14 13:09:31+01:00 |
Add --clobber-cache option to initdb, for CCA testing.
Commit 4656e3d66 replaced the "#define CLOBBER_CACHE_ALWAYS"
testing mechanism with a GUC, which has been a great help for
doing cache-clobber testing in more efficient ways; but there
is a gap in the implementation. The only way to do cache-clobber
testing during an initdb run is to use the old method with #define,
because one can't set the GUC from outside. Improve this by
adding a switch to initdb for the purpose.
(Perhaps someday we should let initdb pass through arbitrary
"-c NAME=VALUE" switches. Quoting difficulties dissuaded me
from attempting that right now, though.)
Back-patch to v14 where 4656e3d66 came in.
Discussion: https://postgr.es/m/[email protected]
| b741f4c3ee67666aa333dbb25bd71906b3474def | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/b741f4c3ee67666aa333dbb25bd71906b3474def | 2021-07-01 13:33:05-04:00 |
Abstract some more architecture-specific details away from SIMD functionality
Add a typedef to represent vectors containing four 32-bit integers,
and add functions operating on them. Also separate out saturating
subtraction into its own function. The motivation for this is to
prepare for a future commit to add ARM NEON support.
Nathan Bossart
Reviewed by John Naylor and Tom Lane
Discussion: https://www.postgresql.org/message-id/flat/CAFBsxsEyR9JkfbPcDXBRYEfdfC__OkwVGdwEAgY4Rv0cvw35EA%40mail.gmail.com#aba7a64b11503494ffd8dd27067626a9
| f8f19f70868c6351b80f02a47fa65d56b728a5a2 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/f8f19f70868c6351b80f02a47fa65d56b728a5a2 | 2022-08-29 13:40:53+07:00 |
In security-restricted operations, block enqueue of at-commit user code.
Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred
triggers within index expressions and materialized view queries. An
attacker having permission to create non-temp objects in at least one
schema could execute arbitrary SQL functions under the identity of the
bootstrap superuser. One can work around the vulnerability by disabling
autovacuum and not manually running ANALYZE, CLUSTER, REINDEX, CREATE
INDEX, VACUUM FULL, or REFRESH MATERIALIZED VIEW. (Don't restore from
pg_dump, since it runs some of those commands.) Plain VACUUM (without
FULL) is safe, and all commands are fine when a trusted user owns the
target object. Performance may degrade quickly under this workaround,
however. Back-patch to 9.5 (all supported versions).
Reviewed by Robert Haas. Reported by Etienne Stalmans.
Security: CVE-2020-25695
| 0c3185e963d9f9dd0608214f7d732b84aa0888fe | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/0c3185e963d9f9dd0608214f7d732b84aa0888fe | 2020-11-09 07:32:09-08:00 |
Check return values of sensitive system library calls.
PostgreSQL already checked the vast majority of these, missing this
handful that nearly cannot fail. If putenv() failed with ENOMEM in
pg_GSS_recvauth(), authentication would proceed with the wrong keytab
file. If strftime() returned zero in cache_locale_time(), using the
unspecified buffer contents could lead to information exposure or a
crash. Back-patch to 9.0 (all supported versions).
Other unchecked calls to these functions, especially those in frontend
code, pose negligible security concern. This patch does not address
them. Nonetheless, it is always better to check return values whose
specification provides for indicating an error.
In passing, fix an off-by-one error in strftime_win32()'s invocation of
WideCharToMultiByte(). Upon retrieving a value of exactly MAX_L10N_DATA
bytes, strftime_win32() would overrun the caller's buffer by one byte.
MAX_L10N_DATA is chosen to exceed the length of every possible value, so
the vulnerable scenario probably does not arise.
Security: CVE-2015-3166
| fd97bd411d1da45b79e63c2124741f8e82cc5a5c | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/fd97bd411d1da45b79e63c2124741f8e82cc5a5c | 2015-05-18 10:02:31-04:00 |
Accept SIGQUIT during error recovery in auxiliary processes.
The bgwriter, checkpointer, walwriter, and walreceiver processes
claimed to allow SIGQUIT "at all times". In reality SIGQUIT
would get re-blocked during error recovery, because we didn't
update the actual signal mask immediately, so sigsetjmp() would
save and reinstate a mask that includes SIGQUIT.
This appears to be simply a coding oversight. There's never a
good reason to hold off SIGQUIT in these processes, because it's
going to just call _exit(2) which should be safe enough, especially
since the postmaster is going to tear down shared memory afterwards.
Hence, stick in PG_SETMASK() calls to install the modified BlockSig
mask immediately.
Also try to improve the comments around sigsetjmp blocks. Most of
them were just referencing postgres.c, which is misleading because
actually postgres.c manages the signals differently.
No back-patch, since there's no evidence that this is causing any
problems in the field.
Discussion: https://postgr.es/m/CALDaNm1d1hHPZUg3xU4XjtWBOLCrA+-2cJcLpw-cePZ=GgDVfA@mail.gmail.com
| 7634bd4f6d38bdef1fe442df5c2e0da73f1f90f4 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/7634bd4f6d38bdef1fe442df5c2e0da73f1f90f4 | 2020-09-11 16:01:28-04:00 |
Add --min-xid-age and --min-mxid-age options to vacuumdb
These two new options can be used to improve the selectivity of
relations to vacuum or analyze even further depending on the age of
respectively their transaction ID or multixact ID, so as it is possible
to prioritize tables to prevent wraparound of one or the other.
Combined with --table, it is possible to target a subset of tables to
choose as potential processing targets.
Author: Nathan Bossart
Reviewed-by: Michael Paquier, Masahiko Sawada
Discussion: https://postgr.es/m/[email protected]
| 00d1e88d36687ceae1be2317fac90e967941c085 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/00d1e88d36687ceae1be2317fac90e967941c085 | 2019-01-31 13:06:51+09:00 |
Add --no-blobs option to pg_dump
Add an option to exclude blobs when running pg_dump. By default, blobs
are included but this option can be used to exclude them while keeping
the rest of the dump.
Commment updates and regression tests from me.
Author: Guillaume Lelarge
Reviewed-by: Amul Sul
Discussion: https://postgr.es/m/VisenaEmail.48.49926ea6f91dceb6.15355a48249@tc7-visena
| 4fafa579b0ab411f4cd2f30c57205d9b0ac27340 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/4fafa579b0ab411f4cd2f30c57205d9b0ac27340 | 2016-11-29 11:09:35-05:00 |
Require the schema qualification in pg_temp.type_name(arg).
Commit aa27977fe21a7dfa4da4376ad66ae37cb8f0d0b5 introduced this
restriction for pg_temp.function_name(arg); do likewise for types
created in temporary schemas. Programs that this breaks should add
"pg_temp." schema qualification or switch to arg::type_name syntax.
Back-patch to 9.4 (all supported versions).
Reviewed by Tom Lane. Reported by Tom Lane.
Security: CVE-2019-10208
| ffa2d37e5fbd1243f918f622113d6e371667e5a0 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/ffa2d37e5fbd1243f918f622113d6e371667e5a0 | 2019-08-05 07:48:41-07:00 |
Add security checks to selectivity estimation functions
Some selectivity estimation functions run user-supplied operators over
data obtained from pg_statistic without security checks, which allows
those operators to leak pg_statistic data without having privileges on
the underlying tables. Fix by checking that one of the following is
satisfied: (1) the user has table or column privileges on the table
underlying the pg_statistic data, or (2) the function implementing the
user-supplied operator is leak-proof. If neither is satisfied, planning
will proceed as if there are no statistics available.
At least one of these is satisfied in most cases in practice. The only
situations that are negatively impacted are user-defined or
not-leak-proof operators on a security-barrier view.
Reported-by: Robert Haas <[email protected]>
Author: Peter Eisentraut <[email protected]>
Author: Tom Lane <[email protected]>
Security: CVE-2017-7484
| e2d4ef8de869c57e3bf270a30c12d48c2ce4e00c | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/e2d4ef8de869c57e3bf270a30c12d48c2ce4e00c | 2017-05-05 12:18:48-04:00 |
Introduce a psql "\connect -reuse-previous=on|off" option.
The decision to reuse values of parameters from a previous connection
has been based on whether the new target is a conninfo string. Add this
means of overriding that default. This feature arose as one component
of a fix for security vulnerabilities in pg_dump, pg_dumpall, and
pg_upgrade, so back-patch to 9.1 (all supported versions). In 9.3 and
later, comment paragraphs that required update had already-incorrect
claims about behavior when no connection is open; fix those problems.
Security: CVE-2016-5424
| 9d924e9a64b91571e04252424c01210fc0f6f6d9 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/9d924e9a64b91571e04252424c01210fc0f6f6d9 | 2016-08-08 10:07:46-04:00 |
Accept alternate spellings of __sparcv7 and __sparcv8.
Apparently some versions of gcc prefer __sparc_v7__ and __sparc_v8__.
Per report from Waldemar Brodkorb.
| 1f64ec6fd28bcd2be9b6b0ad3a5a630e117db601 | postgres | neuralsentry | 0 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/1f64ec6fd28bcd2be9b6b0ad3a5a630e117db601 | 2015-08-10 17:34:51-04:00 |
start-scripts: switch to $PGUSER before opening $PGLOG.
By default, $PGUSER has permission to unlink $PGLOG. If $PGUSER
replaces $PGLOG with a symbolic link, the server will corrupt the
link-targeted file by appending log messages. Since these scripts open
$PGLOG as root, the attack works regardless of target file ownership.
"make install" does not install these scripts anywhere. Users having
manually installed them in the past should repeat that process to
acquire this fix. Most script users have $PGLOG writable to root only,
located in $PGDATA. Just before updating one of these scripts, such
users should rename $PGLOG to $PGLOG.old. The script will then recreate
$PGLOG with proper ownership.
Reviewed by Peter Eisentraut. Reported by Antoine Scemama.
Security: CVE-2017-12172
| dfc015dcf46c1996bd7ed5866e9e045d258604b3 | postgres | neuralsentry | 1 | https://github.com/postgres/postgres | https://github.com/postgres/postgres/commit/dfc015dcf46c1996bd7ed5866e9e045d258604b3 | 2017-11-06 07:11:10-08:00 |
Merge pull request #4857 from youjiali1995/fix-command-getkeys
Fix core dump when using some commands with wrong arguments. | e670ccffeae4904e89364b4fec75b3e2ea90745c | redis | neuralsentry | 1 | https://github.com/redis/redis | https://github.com/redis/redis/commit/e670ccffeae4904e89364b4fec75b3e2ea90745c | 2018-06-18 13:54:38+02:00 |
Changes http to https in README.md (#8843)
| c4a5816ccd05cd0ddbeb87bc061bdb6363027197 | redis | neuralsentry | 0 | https://github.com/redis/redis | https://github.com/redis/redis/commit/c4a5816ccd05cd0ddbeb87bc061bdb6363027197 | 2021-04-24 19:16:39+08:00 |
Streams: checkType for xread & xinfo
| b8913ce72141237570ddfa07a1e412a03d714c51 | redis | neuralsentry | 0 | https://github.com/redis/redis | https://github.com/redis/redis/commit/b8913ce72141237570ddfa07a1e412a03d714c51 | 2018-06-11 01:17:52+08:00 |
Fix regression not aborting transaction on error, and re-edit some error responses (#10612)
1. Disk error and slave count checks didn't flag the transactions or counted correctly in command stats (regression from #10372 , 7.0 RC3)
2. RM_Call will reply the same way Redis does, in case of non-exisitng command or arity error
3. RM_WrongArtiy will consider the full command name
4. Use lowercase 'u' in "unknonw subcommand" (to align with "unknown command")
Followup work of #10127 | df787764e37ba5958d5b902eef3847ec7185b156 | redis | neuralsentry | 1 | https://github.com/redis/redis | https://github.com/redis/redis/commit/df787764e37ba5958d5b902eef3847ec7185b156 | 2022-04-25 12:08:13+02:00 |
Fix config set slowlog-log-slower-than and condition in createLatencyReport
| d6ba4fd56d9e386abaf6926fa47ead1525ff56cb | redis | neuralsentry | 1 | https://github.com/redis/redis | https://github.com/redis/redis/commit/d6ba4fd56d9e386abaf6926fa47ead1525ff56cb | 2018-07-13 17:53:55+08:00 |
Improved the reliability of cluster replica sync tests (#9628)
Improved the reliability of cluster replica sync tests | a6b5d518a98b2760dce137e1696b983aa91e8f30 | redis | neuralsentry | 0 | https://github.com/redis/redis | https://github.com/redis/redis/commit/a6b5d518a98b2760dce137e1696b983aa91e8f30 | 2021-10-13 00:06:53-07:00 |
Test: disable module testing for now.
| 487601d85d95acf71414dee8328e65e8b4fafe08 | redis | neuralsentry | 0 | https://github.com/redis/redis | https://github.com/redis/redis/commit/487601d85d95acf71414dee8328e65e8b4fafe08 | 2019-04-15 16:50:26+02:00 |
CONFIG refactoring: configEnum abstraction.
Still many things to convert inside config.c in the next commits.
Some const safety in String objects creation and addReply() family
functions.
| 8e219224b9c9112806ecc868156fdc0b5e0b6d80 | redis | neuralsentry | 0 | https://github.com/redis/redis | https://github.com/redis/redis/commit/8e219224b9c9112806ecc868156fdc0b5e0b6d80 | 2015-03-11 16:59:56+01:00 |
ACL: add slightly modified version of sha256.c for password hashing.
memory.h include removed, types substituted with stdint types.
| 9d2ecf6be364dc5686e5f8d3269dc77c64014e35 | redis | neuralsentry | 0 | https://github.com/redis/redis | https://github.com/redis/redis/commit/9d2ecf6be364dc5686e5f8d3269dc77c64014e35 | 2019-09-12 12:21:34+02:00 |
Subsets and Splits