status. In particular, I see no reason for deferredTriggerCheckState
to make an explicit entry to note that a particular trigger has its
default state --- that just clutters a list that should normally be
empty or very short. I have plans to revise this module much more
heavily, but this is a simple separable improvement.
Asserts would lead to a server core dump if an error occurred while
trying to abort a failed subtransaction (thereby leading to re-execution
of whatever parts of AbortSubTransaction had already run). This of course
does not prevent such an error from creating an infinite loop, but at
least we don't make the situation worse. Responds to an open item on
the subtransactions to-do list.
elog() emulation code always calls errstart with ERROR error level.
This means that a recursive error call triggered by elog would do
MemoryContextReset(ErrorContext), whether or not this was actually
appropriate. I'm surprised we haven't seen this in the field...
Messages of less than ERROR severity should never be promoted (this
fixes Gaetano Mendola's problem with a COMMERROR becoming a PANIC,
and is obvious in hindsight anyway). Do all promotion in errstart
not errfinish, to ensure that output decisions are made correctly;
the former coding could suppress logging of promoted errors, which
doesn't seem like a good idea. Eliminate some redundant code too.
Windows.
Recap: When running on a localized windows version, the timezone name
returned is also localized, and therefor does not match our lookup
table.
Solution: The registry contains both the name of the timezone in english
and the localized name. The patch adds code to scan the registry for the
localized name and gets the english name from that, and then rescans the
table.
I have tested this on a Swedish WinXP, and it works without problems.
The registry layout is the same in Win2k, but I haven't specifically
tested it. It's also the same on different languages but again only
Swedish is tested.
Magnus Hagander
tablespaces correctly, and is quite restricted on objects covered (only
tables and databases, but not tablespaces and indexes).
The attached patch contributes:
- database_size(name)
- relation_size(text)
These are the well-known functions, tablespace-aware.
- pg_tablespace_size(oid)
- pg_database_size(oid)
- pg_relation_size(oid)
Tablespace-aware implementations, used by the upper functions.
pg_relation_size will report sizes of indexes as well.
- pg_size_pretty(bigint)
Formatting of sizes, to display '146MB' instead of '152885668'
Andreas Pflug