postgresql/src/backend
Tom Lane 6c20bdb2a2 Further tweak memory management for regex DFAs.
Coverity is still unhappy after commit 190c79884, and after looking
closer I think it might be onto something.  The callers of newdfa()
typically drop out if v->err has been set nonzero, which newdfa()
is faithfully doing if it fails.  However, what if v->err was already
nonzero before we entered newdfa()?  Then newdfa() could succeed and
the caller would promptly leak its result.

I don't think this scenario can actually happen, but the predicate
"v->err is always zero when newdfa() is called" seems difficult to be
entirely sure of; there's a good deal of code that potentially could
get that wrong.

It seems better to adjust the callers to directly check for a null
result instead of relying on ISERR() tests.  This is slightly cheaper
than the previous coding anyway.

Lacking evidence that there's any real bug, no back-patch.
2021-03-08 16:32:29 -05:00
..
access Track replication origin progress for rollbacks. 2021-03-08 07:54:03 +05:30
bootstrap Update copyright for 2021 2021-01-02 13:06:25 -05:00
catalog Add trim_array() function. 2021-03-03 16:39:57 -05:00
commands Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
executor Add TID Range Scans to support efficient scanning ranges of TIDs 2021-02-27 22:59:36 +13:00
foreign Update copyright for 2021 2021-01-02 13:06:25 -05:00
jit Use errmsg_internal for debug messages 2021-02-17 11:33:25 +01:00
lib Update copyright for 2021 2021-01-02 13:06:25 -05:00
libpq Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
main Update copyright for 2021 2021-01-02 13:06:25 -05:00
nodes Add missing TidRangeScan readfunc 2021-02-27 23:21:21 +13:00
optimizer Add TID Range Scans to support efficient scanning ranges of TIDs 2021-02-27 22:59:36 +13:00
parser Enhanced cycle mark values 2021-02-27 08:13:24 +01:00
partitioning Message style fix 2021-02-24 07:00:49 +01:00
po Translation updates 2020-05-18 12:49:30 +02:00
port Use errmsg_internal for debug messages 2021-02-17 11:33:25 +01:00
postmaster Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
regex Further tweak memory management for regex DFAs. 2021-03-08 16:32:29 -05:00
replication Add option to enable two_phase commits via pg_create_logical_replication_slot. 2021-03-03 07:34:11 +05:30
rewrite Revert "Propagate CTE property flags when copying a CTE list into a rule." 2021-02-07 12:54:08 -05:00
snowball Update snowball 2021-02-19 08:10:15 +01:00
statistics Update copyright for 2021 2021-01-02 13:06:25 -05:00
storage Remove obsolete comment for WaitForProcSignalBarrier(). 2021-03-02 09:30:57 +13:00
tcop Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
tsearch Fix parsing of complex morphs to tsquery 2021-01-31 20:14:29 +03:00
utils Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Use sort_template.h for qsort_tuple() and qsort_ssup(). 2021-03-03 17:02:32 +13:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Add missing gettext triggers 2020-04-28 13:35:40 +02:00