== Wöchentlicher PostgreSQL Newsletter - 29. Mai 2011 ==

== Wöchentlicher PostgreSQL Newsletter - 29. Mai 2011 ==

am 31.05.2011 21:01:28 von adsmail

Der Originalartikel befindet sich unter:

http://www.postgresql.org/community/weeklynews/pwn20110529



== Wöchentlicher PostgreSQL Newsletter - 29. Mai 2011 ==

== PostgreSQL Produkt Neuigkeiten ==

pgmp 1.0, ein Multi-Präzisions Rechensystem für PostgreSQL,
ist auf PGXN erschienen.
http://pgmp.projects.postgresql.org/
http://pgxn.org/dist/pgmp/

== PostgreSQL Jobs im Mai ==

http://archives.postgresql.org/pgsql-jobs/2011-05/threads.ph p

== PostgreSQL Lokal ==

PG Session 2 über PostGIS findet am 23. Juni in Paris statt.
Der Call for Papers ist jetzt offen.
http://www.postgresql-sessions.org/en/2/

CHAR(11), die PostgreSQL Konferenz für Clustering, Hochverfügbark=
eit
und Replikation hat jetzt die Registrierung eröffnet.
Die Konferenz findet am 11. und 12. Juli 2011 in Cambridge, UK statt.
http://www.char11.org/

PostgreSQL Conference China 2011 findet in Guangzhou am
15. und 16. Juli 2011 statt.
http://wiki.postgresql.org/wiki/Pgconchina2011

PDXPUG hostet PgDay am Sonntag, dem 24. Juli 2011, einen Tag
vor der OSCON in Portland, Oregon, USA. Details hier:
http://pugs.postgresql.org/node/1663

Postgres Open 2011, eine Konferenz die sich auf den Umbruch der
Datenbankindustrie durch PostgreSQL konzentriert, wird vom 14. bis 16.
September 2011 in Chicago, Illinois im Westin Michigan Avenue
Hotel stattfinden.
http://postgresopen.org

PostgreSQL Conference West (#PgWest) findet vom 27. bis 30. September
2011 im San Jose Convention Center in Jan Jose, Kalifornen, USA statt.
http://www.postgresqlconference.org

PostgreSQL Conference Europe 2011 findet vom 18. bis
21. Oktober in Amsterdam statt.
http://2011.pgconf.eu/

pgbr findet in Sao Paulo, Brazilien, am 3. und 4. November 2011 statt.
http://pgbr.postgresql.org.br/

== PostgreSQL in den News ==

Planet PostgreSQL: http://planet.postgresql.org/

Dieser wöchentliche PostgreSQL Newsletter wurde erstellt von David Fet=
ter.

Sende Neuigkeiten und Ankündigungen bis Sonntag, 15 Uhr Pazifischer
Zeit. Bitte sende englische Beiträge an david@fetter.org, deutsche an
pwn@pgug.de, italienische an pwn@itpug.org, spanische an pwn@arpug.com.ar.

== Reviews ==

== Angewandte Patches ==

Tom Lane pushed:

- Install defenses against overflow in BuildTupleHashTable(). The
planner can sometimes compute very large values for numGroups, and
in cases where we have no alternative to building a hashtable, such
a value will get fed directly to BuildTupleHashTable as its nbuckets
parameter. There were two ways in which that could go bad. First,
BuildTupleHashTable declared the parameter as "int" but most callers
were passing "long"s, so on 64-bit machines undetected overflow
could occur leading to a bogus negative value. The obvious fix for
that is to change the parameter to "long", which is what I've done
in HEAD. In the back branches that seems a bit risky, though, since
third-party code might be calling this function. So for them, just
put in a kluge to treat negative inputs as INT_MAX. Second,
hash_create can go nuts with extremely large requested table sizes
(notably, my_log2 becomes an infinite loop for inputs larger than
LONG_MAX/2). What seems most appropriate to avoid that is to bound
the initial table size request to work_mem. This fixes bug #6035
reported by Daniel Schreiber. Although the reported case only
occurs back to 8.4 since it involves WITH RECURSIVE, I think it's a
good idea to install the defenses in all supported branches.
=20
http://git.postgresql.org/pg/commitdiff/299d1716525c659f0e02 840e31fbe4dea3c=
c796c

- Lobotomize typmod check in convert_tuples_by_position, back branches
only. convert_tuples_by_position was rejecting attempts to coerce a
record field with -1 typmod to the same type with a non-default
typmod. This is in fact the "correct" thing to do (since we're just
going to do a type relabeling, not invoke any length-conversion cast
function); but it results in rejecting valid cases like bug #6020,
because the source record's tupdesc is built from Params that don't
have typmod assigned. Since that's a regression from previous
versions, which accepted this code, we have to do something about
it. In HEAD, I've fixed the problem properly by causing the Params
to receive the correct typmods; but the potential for incidental
behavioral changes seems high enough to make it unattractive to make
the same change in released branches. (And it couldn't be fixed
that way in 8.4 anyway...) Hence this patch just modifies
convert_tuples_by_position to not complain if either the input or
the output tupdesc has typmod -1. This is still a shade tighter
checking than we did before 9.0, since before that plpgsql failed to
consider typmods at all when checking record compatibility.
(convert_tuples_by_position is currently used only by plpgsql, so
we're not affecting other behavior.) Back-patch to 8.4, since we
recently back-ported convert_tuples_by_position into that branch.
=20
http://git.postgresql.org/pg/commitdiff/e48433e9f81d6aceef2b 538f1783fbcc91e=
1074f

- Make plpgsql complain about conflicting IN and OUT parameter names.
The core CREATE FUNCTION code only enforces that IN parameter names
are non-duplicate, and that OUT parameter names are separately
non-duplicate. This is because some function languages might not
have any confusion between the two. But in plpgsql, such names are
all in the same namespace, so we'd better disallow it. Per a recent
complaint from Dan S. Not back-patching since this is a small issue
and the change could cause unexpected failures if we started to
enforce it in a minor release.
=20
http://git.postgresql.org/pg/commitdiff/59a4a571d396ec00a7e3 63dca8b2f5eb2d8=
307ad

- Avoid uninitialized bits in the result of QTN2QT(). Found with
additional valgrind testing. Noah Misch
=20
http://git.postgresql.org/pg/commitdiff/cc24fb418d8da7ed93f9 cd936f7da8fc7e0=
381bf

- Adjust configure's probe for libselinux so it rejects too-old
versions. We need at least version 2.0.93, so probe for a function
that was added in that version. Kaigai Kohei
=20
http://git.postgresql.org/pg/commitdiff/8ff1f6a78c4fb48337f6 71f1586839cef5d=
4b940

- Cleanup for pull-up-isReset patch. Clear isReset before, not after,
calling the context-specific alloc method, so as to preserve the
option to do a tail call in MemoryContextAlloc (and also so this
code isn't assuming that a failed alloc call won't have changed the
context's state before failing). Fix missed direct invocation of
reset method. Reformat a comment.
=20
http://git.postgresql.org/pg/commitdiff/b23aeb6519651146cf35 b2b91d24596f37b=
40794

- Grammar cleanup for src/test/isolation/README. Josh Kupershmidt
=20
http://git.postgresql.org/pg/commitdiff/446d5d32aedcca378578 c8fe1c2eed34df9=
2a238

- Suppress extensions in partial dumps. We initially had pg_dump emit
CREATE EXTENSION commands unconditionally. However, pg_dump has
long been in the habit of not dumping procedural language
definitions when a --schema or --table switch is given. It seems
appropriate to handle extensions the same way, since like PLs they
are SQL objects that are not in any particular schema. Per
complaint from Adrian Schreyer.
=20
http://git.postgresql.org/pg/commitdiff/7b158d1baed859971c1a a792bff6a7e1f72=
1cf91

- Adjust configure to use "+Olibmerrno" with HP-UX C compiler, if
possible. This is reported to be necessary on some versions of that
OS. In service of this, cause PGAC_PROG_CC_CFLAGS_OPT to reject
switches that result in compiler warnings, since on yet other
versions of that OS, the switch does nothing except provoke a
warning. Report and patch by Ibrar Ahmed, further tweaking by me.
=20
http://git.postgresql.org/pg/commitdiff/44404f394517f89a0beb b1aaace6e64ad79=
d2817

- Make decompilation of optimized CASE constructs more robust. We had
some hacks in ruleutils.c to cope with various odd transformations
that the optimizer could do on a CASE foo WHEN "CaseTestExpr =3D RHS"
clause. However, the fundamental impossibility of covering all
cases was exposed by Heikki, who pointed out that the "=3D" operator
could get replaced by an inlined SQL function, which could contain
nearly anything at all. So give up on the hacks and just print the
expression as-is if we fail to recognize it as "CaseTestExpr =3D RHS".
(We must cover that case so that decompiled rules print correctly;
but we are not under any obligation to make EXPLAIN output be 100%
valid SQL in all cases, and already could not do so in some other
cases.) This approach requires that we have some printable
representation of the CaseTestExpr node type; I used
"CASE_TEST_EXPR". Back-patch to all supported branches, since the
problem case fails in all.
=20
http://git.postgresql.org/pg/commitdiff/3987e9e62046bd800d8d 08566ed49fee1ae=
6cb86

- Preserve caller's memory context in ProcessCompletedNotifies().
This is necessary to avoid long-term memory leakage, because the
main loop in PostgresMain expects to be executing in MessageContext,
and hence is a bit sloppy about freeing stuff that is only needed
for the duration of processing the current client message. The
known case of an actual leak is when encoding conversion has to be
done on the incoming command string, but there might be others. Per
report from Per-Olov Esgard. Back-patch to 9.0, where the bug was
introduced by the LISTEN/NOTIFY rewrite.
=20
http://git.postgresql.org/pg/commitdiff/90857b48e1f69dbca52f 498bd444190d36d=
bd73f

- Improve corner cases in pg_ctl's new wait-for-postmaster-startup
code. With "-w -t 0", we should report "still starting up", not
"ok". If we fall out of the loop without ever being able to call
PQping (because we were never able to construct a connection
string), report "no response", not "ok". This gets rid of corner
cases in which we'd claim the server had started even though it had
not. Also, if the postmaster.pid file is not there at any point
after we've waited 5 seconds, assume the postmaster has failed and
report that, rather than almost-certainly-fruitlessly continuing to
wait. The pidfile should appear almost instantly even when there is
extensive startup work to do, so 5 seconds is already a very
conservative figure. This part is per a gripe from MauMau --- there
might be better ways to do it, but nothing simple enough to get done
for 9.1.
=20
http://git.postgresql.org/pg/commitdiff/0bae3bc9be4a025df089 f0a0c2f547fa538=
a97bc

- Fix null-dereference crash in parse_xml_decl(). parse_xml_decl's
header comment says you can pass NULL for any unwanted output
parameter, but it failed to honor this contract for the "standalone"
flag. The only currently-affected caller is xml_recv, so the net
effect is that sending a binary XML value containing a standalone
parameter in its xml declaration would crash the backend. Per bug
#6044 from Christopher Dillard. In passing, remove useless
initializations of parse_xml_decl's output parameters in xml_parse.
Back-patch to 8.3, where this code was introduced.
=20
http://git.postgresql.org/pg/commitdiff/5e1365a9650678a53110 6120e40676a9417=
971f1

Peter Eisentraut pushed:

- Message style improvements
=20
http://git.postgresql.org/pg/commitdiff/c58b945e23e63a0baca6 7b216a5225b34de=
84cce

- Add a "local" replication sample entry. Also adjust alignment a bit
to distinguish commented out from comment.
=20
http://git.postgresql.org/pg/commitdiff/f50655900a865d65d17b b79f57f1d8c48b1=
cb266

- Message improvements
=20
http://git.postgresql.org/pg/commitdiff/c8d45152fa04c77370fc 16faf0727c0f527=
39f0a

- Put options in some sensible order. For the --help output and
reference pages of pg_dump, pg_dumpall, pg_restore, put the options
in some consistent, mostly alphabetical, and consistent order,
rather than newest option last or something like that.
=20
http://git.postgresql.org/pg/commitdiff/3439e40f9afa5e8702c8 e3e7d0b09a0cb4b=
07e73

- Remove literal tabs from message strings
=20
http://git.postgresql.org/pg/commitdiff/4d7d6386d701ebf36a4d e4c2a8c32826a99=
9e437

- Avoid compiler warning when building without zlib.
=20
http://git.postgresql.org/pg/commitdiff/1b6dabc452b9357e39b6 3a94c109e2293f1=
3a555

- Allow pg_basebackup compressed tar output to stdout
=20
http://git.postgresql.org/pg/commitdiff/d68714b29c42d10437b5 6372d6b0a1dda1e=
7d7f5

- Correct description of log_connections and log_disconnections. The
previous claim when these parameters could be changed was incorrect.
Fujii Masao
=20
http://git.postgresql.org/pg/commitdiff/cb0defe5230f3773feb3 34a01b990c9eaac=
a301b

- Add pg_basebackup -z option for compression with default level
=20
http://git.postgresql.org/pg/commitdiff/6fa79755bd393cdfadb6 197164cbe014984=
74be3

Robert Haas pushed:

- Improve hash_array() logic for combining hash values. The new logic
is less vulnerable to transpositions. This invalidates the contents
of hash indexes built with the old functions; hence, bump
catversion. Dean Rasheed
=20
http://git.postgresql.org/pg/commitdiff/7149b128dc12ece64c18 2962dc4f882ea75=
59d0c

Heikki Linnakangas pushed:

- Fix integer overflow in text_format function, reported by Dean
Rasheed. In the passing, clarify the comment on why text_format_nv
wrapper is needed.
=20
http://git.postgresql.org/pg/commitdiff/34be83b7e142a718c7a8 31c9df9763aa83f=
e4cd5

- Replace strdup() with pstrdup(), to avoid leaking memory. It's been
like this since the seg module was introduced, so backpatch to 8.2
which is the oldest supported version.
=20
http://git.postgresql.org/pg/commitdiff/7541d32e86b739afb41e 711a4c790aed446=
dd0e2

- Check the return code of pthread_create(). Otherwise we go into an
infinite loop if it fails, which is what what happened on my HP-UX
box. (I think the reason it failed on that box is a misconfiguration
on my behalf, but that's no reason to hang.)
=20
http://git.postgresql.org/pg/commitdiff/336db7e3474508b46a0e 6bdb013a8bee5aa=
c9adf

Bruce Momjian pushed:

- In pg_upgrade, do case-insensitive checks of locale, encoding, and
ctype because these are often inconsistently capitalized.
=20
http://git.postgresql.org/pg/commitdiff/11c08c3fd79f1fd5a83f 9156fc1c43c7be3=
453ce

- Add C comment about why we don't spell out "month" in interval
values.
=20
http://git.postgresql.org/pg/commitdiff/0711a8b2b340ee0b0a7f d7ea2ac0fa6aee4=
708ae

Andrew Dunstan pushed:

- Convert builddoc.bat into a perl script that actually works. The
old .bat file wasn't working for reasons that are unclear, and which
it did not seem worth the trouble to ascertain. The new perl script
has been tested and is known to work. Soon it will be tested
regularly on the buildfarm. The .bat file is kept as a simple
wrapper for the perl script.
=20
http://git.postgresql.org/pg/commitdiff/8c3604ae7fa1602e00b6 39447e894f9d59f=
9d297

Peter Eisentraut pushed:

- Drop "meaning" column from error code table. This is currently the
same as the condition name, so it doesn't add any value, only clutter.
http://git.postgresql.org/pg/commitdiff/420dcaaeb1a3be51b641 7da59ce69d79543=
69211

Alvaro Herrera pushed:

- Remove unused variable. Cédric Villemain
=20
http://git.postgresql.org/pg/commitdiff/4c60a77508ee4f4d8956 29905265d79feaa=
b108c

== Abgelehnte Patches (bis jetzt) ==

No one was disappointed this week :-)

== Eingesandte Patches ==

Robert Haas sent in another revision of the patch to make the
visibility map crash-safe.

Alexander Korotkov sent in two more revisions of the patch to collect
statistics for array columns.

Aaron Swenson sent in a patch which changes the pg_ctl exit status
when the server is not running to 3, which the Linux Standard Base
Core Specification 3.1 requires.

Alexander Korotkov sent in a patch for GiST which moves the
GISTInsertStack structure from parent to child. This simplifies
coding and allows maintaining parts of the tree in GISTInsertStack
structures.

Jaime Casanova sent in two more revisions of the patch to add a new
column to IDENTIFY_SYSTEM.

Leonardo Francalanci sent in three more revisions of the patch to use
less space in xl_xact_commit.

Josh Kupershmidt sent in another revision of the patch to allow \dd to
show constraint comments.

Kevin Grittner sent in patches to convert from row to tuple locking,
and to document same.

Noah Misch sent in a patch to further help the domain/array mismatch.

Fujii Masao sent in a WIP patch to allow for cascading replication.

Peter Geoghegan sent in two more revisions of the patch which
monitiors and acts on postmaster death via latches on both *n*x and
Windows.

Stephen Frost sent in a PoC patch to Pre-allocate ListCells.

Tom Lane sent in a patch to change how vacuum analyzes reltuples.

MauMau sent in a patch to help distinguish PostgreSQL instances in the
Windows event log.

Josh Kupershmidt sent in a patch to enable some new tab completions
for COMMENT ON in psql.

Jeff Janes sent in a patch to add an option to pgbench which stresses
the executor.

--
Andreas 'ads' Scherbaum
Deutsche PostgreSQL User Group: http://www.pgug.de/
DPWN: http://andreas.scherbaum.la/blog/categories/18-PWN




--=20
Sent via pgsql-de-allgemein mailing list (pgsql-de-allgemein@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-de-allgemein