git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 9db7d47) | patch
Replace over-optimistic Assert in partitioning code with a runtime test.
Sun, 4 Jun 2017 20:20:03 +0000 (16:20 -0400)
Sun, 4 Jun 2017 20:20:03 +0000 (16:20 -0400)
commit e7941a976688f0f5d13a5227ed4f3efe0718db9d
Replace over-optimistic Assert in partitioning code with a runtime test.

get_partition_parent felt that it could simply Assert that systable_getnext
found a tuple. This is unlike any other caller of that function, and it's
unsafe IMO --- in fact, the reason I noticed it was that the Assert failed.
(OK, I was working with known-inconsistent catalog contents, but I wasn't
expecting the DB to fall over quite that violently. The behavior in a
non-assert-enabled build wouldn't be very nice, either.) Fix it to do what
other callers do, namely an actual runtime-test-and-elog.

Also, standardize the wording of elog messages that are complaining about
unexpected failure of systable_getnext. 90% of them say "could not find
tuple for <object>", so make the remainder do likewise. Many of the
holdouts were using the phrasing "cache lookup failed", which is outright
misleading since no catcache search is involved.
contrib/sepgsql/database.c diff | blob | blame | history
contrib/sepgsql/proc.c diff | blob | blame | history
contrib/sepgsql/relation.c diff | blob | blame | history
contrib/sepgsql/schema.c diff | blob | blame | history
src/backend/catalog/aclchk.c diff | blob | blame | history
src/backend/catalog/objectaddress.c diff | blob | blame | history
src/backend/catalog/partition.c diff | blob | blame | history
src/backend/commands/extension.c diff | blob | blame | history
src/backend/utils/adt/ruleutils.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /