== PostgreSQL Weekly News – August 26 2012 ==

== PostgreSQL Weekly News – August 26 2012 ==

== PostgreSQL Product News ==

DataArchitect 4.3, a database architecture and modeling tool, released.
http://www.byteanywhere.com/news/

PostgreSQL PHP Generator 12.8, a GUI CRUD web application generator for PostgreSQL, released.
http://www.sqlmaestro.com/products/postgresql/phpgenerator/

psqlODBC 09.01.0200 released.
http://www.postgresql.org/ftp/odbc/versions/

Postgres Plus xDB Replication Server BETA with Multi-Master support is available.
http://www.enterprisedb.com/download-xdb-replication-server

== PostgreSQL Jobs for August ==

http://archives.postgresql.org/pgsql-jobs/2012-08/threads.php

== PostgreSQL Local ==

PostgreSQL Session will be held on October 4th, 2012, in Paris,
France. More information at:
http://www.postgresql-sessions.org/en/4/

PostgreSQL Conference Europe 2012 will be in Prague, Czech Republic
on October 23-26.
http://2012.pgconf.eu/

PostgreSQL Day Argentina 2012 will be held on November 13th in Bernal,
Buenos Aires, at the National University of Quilmes. It will cover
topics for PostgreSQL users, developers and contributors, as well as
decision and policy makers. For more information about the
conference, please see the website at
http://www.pgday.com.ar/quilmes2012?lang=en

== PostgreSQL in the News ==

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

PostgreSQL Weekly News is brought to you this week by David Fetter

Submit news and announcements by Sunday at 3:00pm Pacific time.
Please send English language ones to david@fetter.org, German language
to pwn@pgug.de, Italian language to pwn@itpug.org. Spanish language
to pwn@arpug.com.ar.

== Applied Patches ==

Heikki Linnakangas pushed:

- Don’t get confused if a WAL partial record header has xl_tot_len ==
0. If a WAL record header was split across pages, but xl_tot_len
was 0, we would get confused and conclude that we had already read
the whole record, and proceed to CRC check it. That can lead to a
crash in RecordIsValid(), which isn’t careful to not read beyond
end-of-record, as defined by xl_tot_len. Add an explicit sanity
check for xl_tot_len <= SizeOfXlogRecord. Also, make
RecordIsValid() more robust by checking in each step that it doesn’t
try to access memory beyond end of record, even if a length field in
the record’s or a backup block’s header is bogus. Per report and
analysis by Tom Lane.
http://git.postgresql.org/pg/commitdiff/51fed14d73ed3acd2282b531fb1396877e44e86a

- Fix typo in example.
http://git.postgresql.org/pg/commitdiff/8b6b50a34dea0852511094405f0298d78c3b43fe

Tom Lane pushed:

- Fix bugs in contrib/pg_trgm’s LIKE pattern analysis code.
Extraction of trigrams did not process LIKE escape sequences
properly, leading to possible misidentification of trigrams near
escapes, resulting in incorrect index search results. Fujii Masao
http://git.postgresql.org/pg/commitdiff/b2a01b9ad1c6b074df1c4bc75ca988230dfa3cf0

- Fix dumping of security_barrier views with circular dependencies.
If a view has circular dependencies, pg_dump splits it into a CREATE
TABLE and a CREATE RULE command to break the dependency loop.
However, if the view has reloptions, those options cannot be applied
in the CREATE TABLE command, because views and tables have different
allowed reloptions so CREATE TABLE would reject them. Instead apply
the reloptions after the CREATE RULE, using ALTER VIEW SET.
http://git.postgresql.org/pg/commitdiff/0f524ea0cf388a149f362e48a33c01662eeddc04

- Avoid somewhat-theoretical overflow risks in RecordIsValid(). This
improves on commit 51fed14d73ed3acd2282b531fb1396877e44e86a by
eliminating the assumption that we can form <some pointer value> +
<some offset> without overflow. The entire point of those tests is
that we don’t trust the offset value, so coding them in a way that
could wrap around if the buffer happens to be near the top of memory
doesn’t seem sound. Instead, track the remaining space as a size_t
variable and compare offsets against that. Also, improve comment
about why we need the extra early check on xl_tot_len.
http://git.postgresql.org/pg/commitdiff/10685ec082181b285a48d982b4c3463fd80ee5ae

- Update 9.2 release notes to reflect commits to date. I was unable
to entirely resist the temptation to copy-edit related entries, but
will save most of that for a separate pass.
http://git.postgresql.org/pg/commitdiff/0830cc9fe0ebebf0593ca2458ccf08638a546fb4

- Fix erroneous documentation of synchronous_commit = remote_write.
The docs claimed that this mode only waits for the standby to
receive WAL data, but actually it waits for the data to be written
out to the standby’s OS; which is a pretty significant difference
because it removes the risk of crash of the walreceiver process.
http://git.postgresql.org/pg/commitdiff/932a271956afac90a676b946fd3e356b45581445

- Make an editorial pass over the 9.2 release notes. A very large
number of small improvements …
http://git.postgresql.org/pg/commitdiff/979f8f0431ab2a727a45a4568f25d852aa0b94aa

- Make a cut at a major-features list for 9.2. This is open to debate
of course, but it’s past time we had *something* here.
http://git.postgresql.org/pg/commitdiff/b33f611682d0c587bb1496ff529fab1970f0d44c

- Remove overly-pessimistic statement about constraint exclusion. As
of 9.2, constraint exclusion should work okay with prepared
statements: the planner will try custom plans with actual values of
the parameters, and observe that they are a lot cheaper than the
generic plan, and thus never fall back to using the generic plan.
Noted by Tatsuhito Kasahara.
http://git.postgresql.org/pg/commitdiff/6e2e12c9477c3b48854433251ebca9709be3e87b

- Fix cascading privilege revoke to notice when privileges are still
held. If we revoke a grant option from some role X, but X still
holds the option via another grant, we should not recursively revoke
the privilege from role(s) Y that X had granted it to. This was
supposedly fixed as one aspect of commit
4b2dafcc0b1a579ef5daaa2728223006d1ff98e9, but I must not have tested
it, because in fact that code never worked: it forgot to shift the
grant-option bits back over when masking the bits being revoked.
Per bug #6728 from Daniel German. Back-patch to all active
branches, since this has been wrong since 8.0.
http://git.postgresql.org/pg/commitdiff/ec8a0135c3228087761ad3cdba18aebb01c7e17a

- Fix issues with checks for unsupported transaction states in Hot
Standby. The GUC check hooks for transaction_read_only and
transaction_isolation tried to check RecoveryInProgress(), so as to
disallow setting read/write mode or serializable isolation level
(respectively) in hot standby sessions. However, GUC check hooks
can be called in many situations where we’re not connected to shared
memory at all, resulting in a crash in RecoveryInProgress(). Among
other cases, this results in EXEC_BACKEND builds crashing during
child process start if default_transaction_isolation is
serializable, as reported by Heikki Linnakangas. Protect those
calls by silently allowing any setting when not inside a
transaction; which is okay anyway since these GUCs are always reset
at start of transaction. Also, add a check to
GetSerializableTransactionSnapshot() to complain if we are in hot
standby. We need that check despite the one in check_XactIsoLevel()
because default_transaction_isolation could be serializable. We
don’t want to complain any sooner than this in such cases, since
that would prevent running transactions at all in such a state; but
a transaction can be run, if SET TRANSACTION ISOLATION is done
before setting a snapshot. Per report some months ago from Robert
Haas. Back-patch to 9.1, since these problems were introduced by
the SSI patch. Kevin Grittner and Tom Lane, with ideas from Heikki
Linnakangas
http://git.postgresql.org/pg/commitdiff/7abaa6b9d3eeccf777c0210b7340d960b9cceb97

- Fix up planner infrastructure to support LATERAL properly. This
patch takes care of a number of problems having to do with failure
to choose valid join orders and incorrect handling of lateral
references pulled up from subqueries. Notable changes: 1. Add a
LateralJoinInfo data structure similar to SpecialJoinInfo, to
represent join ordering constraints created by lateral references.
(I first considered extending the SpecialJoinInfo structure, but the
semantics are different enough that a separate data structure seems
better.) Extend join_is_legal() and related functions to prevent
trying to form unworkable joins, and to ensure that we will consider
joins that satisfy lateral references even if the joins would be
clauseless. 2. Fill in the infrastructure needed for the last few
types of relation scan paths to support parameterization. We’d have
wanted this eventually anyway, but it is necessary now because a
relation that gets pulled up out of a UNION ALL subquery may acquire
a reltargetlist containing lateral references, meaning that its
paths *have* to be parameterized whether or not we have any code
that can push join quals down into the scan. 3. Compute data about
lateral references early in query_planner(), and save in RelOptInfo
nodes, to avoid repetitive calculations later. 4. Assorted
corner-case bug fixes. There’s probably still some bugs left, but
this is a lot closer to being real than it was before.
http://git.postgresql.org/pg/commitdiff/9ff79b9d4e71822a875c0f5e38f5ec86c7fb079f

Robert Haas pushed:

- Tab complete “TABLE whatever DROP CONSTRAINT” with a constraint
name. Jeff Janes
http://git.postgresql.org/pg/commitdiff/68386fc15b8ba01b5a4c4ed98c4a4d4968817cc9

- Improved tab completion for CLUSTER VERBOSE. Jeff Janes
http://git.postgresql.org/pg/commitdiff/029722ac8e0d6b52872486b9d1907530fc8a0192

- Add a note to the MVCC chapter that some things aren’t
transactional. Craig Ringer, slightly edited by me.
http://git.postgresql.org/pg/commitdiff/82ef3d3008f8ec9c565f7a5724196cd0f342d594

- Improve C comments in GetSnapshotData. Move discussion of why our
algorithm for taking snapshots in recovery to a more appropriate
location in the function, and delete incorrect mention of taking a
lock.
http://git.postgresql.org/pg/commitdiff/4b373e42d1efd24f871193ce8178c41f199c5df3

Peter Eisentraut pushed:

- Remove external PID file on postmaster exit
http://git.postgresql.org/pg/commitdiff/ffdd5a0ee37c5ac38038aeff98328727e986d2da

- Teach compiler that ereport(>=ERROR) does not return. When elevel
>= ERROR, we add an abort() call to the ereport() macro to give the
compiler a hint that the ereport() expansion will not return, but
the abort() isn’t actually reached because the longjmp happens in
errfinish(). Because the effect of ereport() varies with the
elevel, we cannot use standard compiler attributes such as noreturn
for this.
http://git.postgresql.org/pg/commitdiff/71450d7fd6c7cf7b3e38ac56e363bff6a681973c

- Mark DateTimeParseError() noreturn. This avoids a warning from
clang 3.2 about an uninitialized variable ‘dtype’ in date_in().
http://git.postgresql.org/pg/commitdiff/5c45d2f87835ccd3ffac338845ec79cab1b31a11

- Fix install-strip on Mac OS X. There was a hack put into install-sh
to call strip with the correct options on Mac OS X. But that never
worked, because configure disabled stripping on that platform
altogether. So remove that dead code, and while we’re at it, update
install-sh to the latest upstream source (from Automake). Instead,
set up the right strip options in programs.m4, so this now actually
works the way it was originally intended.
http://git.postgresql.org/pg/commitdiff/b748d8f280100e4ddbafcc65a768e287a1dfcc22

- Add instructions for setting up documentation tool chain on Mac OS X
http://git.postgresql.org/pg/commitdiff/26a6267226cd4ff84040e4bf4b0d0a7fd1b5258c

- pg_upgrade: Run the created scripts in the test suite. Just to
check that they actually work.
http://git.postgresql.org/pg/commitdiff/7afa8bed65ea925208f128048f3a528a64e1319a

- libpq: Fix memory leak in URI parser. When an invalid query
parameter is reported, some memory leaks. found by Coverity
http://git.postgresql.org/pg/commitdiff/4faf074a53bb8e8e03714ce2746b9d11a95dc6e5

- Put options on man page and in help output in slightly better order
http://git.postgresql.org/pg/commitdiff/406473b152338a015ad7e222f92b9b885f277fe8

- Normalize some British spellings
http://git.postgresql.org/pg/commitdiff/8606e47e1120b891e9a539881c0aa2bb9b03ba62

- Some spelling adjustments in release notes
http://git.postgresql.org/pg/commitdiff/7514208fbb29f62511c77d2ce4f9ec0608487426

- pg_basebackup: Correct error message. It still thought that the
–xlog-method option argument could be empty, as in a previous
version of this feature.
http://git.postgresql.org/pg/commitdiff/6bb0b08fe65de32c5d43c0f7c76bd34801ce5056

Bruce Momjian pushed:

- Document that pg_reload_conf() is also an easy way to reload the
configuration file.
http://git.postgresql.org/pg/commitdiff/7dff5b8edd898146ffa4afc2df3f9d5c67e43f0e

- Fix typo.
http://git.postgresql.org/pg/commitdiff/03af60c010aebc0a100416897ecb0948168c99c9

- Allow text timezone designations, e.g. “America/Chicago”, when using
the ISO “T” timestamptz format.
http://git.postgresql.org/pg/commitdiff/3e1a373e2b102b43faa8bbc4841f7511174e1166

- Document clearly that psql ! parameter interpretation limitations
are the same as copy.
http://git.postgresql.org/pg/commitdiff/f6752ee59af4b95248c32b0ee6477a15b0e93c63

- Use psql_error() for most psql error calls, per request from Magnus
Hagander.
http://git.postgresql.org/pg/commitdiff/9e9a5b71d56a40292e6485ff03e1b65351664ece

- Clarify documentation that primary key and unique constraints are
copied for CREATE TABLE LIKE … INCLUDING INDEXES. Per report from
david <DOT> sahagian <AT> emc <DOT> com
http://git.postgresql.org/pg/commitdiff/de87d4704432e98a327dbf42dbc4711fa2628a9c

- Update FreeBSD kernel configuration documentation. Brad Davis
http://git.postgresql.org/pg/commitdiff/7a42dff47e37e7cd7ba03a2ed6531f2d9a206e74== Rejected Patches (for now) ==

No one was disappointed this week

== Pending Patches ==

Pavel Stehule sent in another revision of the patch to enhance error
fields in PL/pgsql.

Alexander Korotkov sent in a patch to fix an issue in gistchoose.

Andrew Dunstan sent in two revisions of a patch implementing ALTER
enum … ADD VALUE IF NOT EXISTS.

Zoltan Boszormenyi sent in another revision of the patches to create a
lock timeout framework and use same to implement lock timeouts.

Qi Huang sent in a patch implementing TABLESAMPLE.

Amit Kapila sent in two more revisions of a patch intended to improve
performance by reducing WALs written during updates.

Michael Paquier sent in a patch to clean up some of the functions in
the PostgreSQL FDW.

Alvaro Herrera sent in another revision of the foreign key locks
patch.

KaiGai Kohei sent in a WIP patch to enable writes to FDWs.

Amit Kapila sent in a patch to fix an issue in pg_ctl on Windows.

Alvaro Herrera sent in two revisions of a patch to improve
pg_upgrade’s exec_prog() coding.

Heikki Linnakangas sent in another revision of the patch to improve
estimates and selectivity estimates for ranges.

Tomas Vondra sent in a patch to add support for aggregation of info
written into the log.

Tomas Vondra sent in a patch to optimize dropping multiple tables in a
single transaction.

Tomas Vondra sent in two revisions of a patch to allow random sampling
of transaction written into the log.

Bruce Momjian sent in a patch to show timing overhead.

Bruce Momjian sent in a patch to detect empty lock files.

Comments are closed.