== PostgreSQL Weekly News - May 27 2018 ==

From: David Fetter <david(at)fetter(dot)org>
To: PostgreSQL Announce <pgsql-announce(at)postgresql(dot)org>
Subject: == PostgreSQL Weekly News - May 27 2018 ==
Date: 2018-05-27 19:05:17
Message-ID: 20180527190517.GA29473@fetter.org
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-announce

== PostgreSQL Weekly News - May 27 2018 ==

PostgreSQL 11 Beta 1 released. Test!

== PostgreSQL Product News ==

Buildfarm 8 software, a continuous integration system for the PostgreSQL
project, released.

pgmetrics 1.3, a command-line tool to extract and display metrics from a PostgreSQL
server, released.

Elephant Shed 1.2, a PostgreSQL appliance, released.

== PostgreSQL Jobs for May ==


== PostgreSQL Local ==

PGCon 2018 will take place in Ottawa on May 29 - June 1, 2018.

Swiss PGDay 2018 will take place in Rapperswil (near Zurich) on June 29, 2018.
Registration is open through June 28, 2018.

PGConf.Brazil 2018 will take place in São Paulo, Brazil on August 3-4 2018.

PG Day France 2018 will take place in Marseille on June 26, 2018.

The Portland PostgreSQL Users Group will be holding a PGDay on September 10,
2018 in Portland, OR. The CfP is open at https://goo.gl/forms/E0CiUQGSZGMYwh922

PgConf Silicon Valley 2018 will be held in San Francisco on September 5-7, 2018.
The CfP is open until June 12th, Anywhere on Earth (AoE) (2018-06-12 23:59:59-12:00)

PostgresConf South Africa 2018 will take place in Johannesburg on October 9, 2018
The Call for Papers is open through June 30, 2018.

== 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 EST5EDT. Please send English
language ones to david(at)fetter(dot)org, German language to pwn(at)pgug(dot)de, Italian
language to pwn(at)itpug(dot)org(dot)

== Applied Patches ==

Tom Lane pushed:

- Fix unportable usage of printf("%m"). While glibc's version of printf accepts
%m, most others do not; to be portable, we have to do it the hard way with
%strerror(errno). pg_verify_checksums evidently did not get that memo. Noted
%while fooling around with NetBSD-current, which generates a compiler warning
%for this mistake.

- Fix unsafe usage of strerror(errno) within ereport(). This is the converse of
the unsafe-usage-of-%m problem: the reason ereport/elog provide that format
code is mainly to dodge the hazard of errno getting changed before control
reaches functions within the arguments of the macro. I only found one
instance of this hazard, but it's been there since 9.4 :-(.

- Doc: fix bogus cross-reference link. An xref to a <para>'s ID isn't very
helpful because paras don't have names. This causes a warning while building
PDFs, though for some reason not while building HTML. The link arguably went
to the wrong place, too. To fix, introduce a sub-section we can reference.

- Improve spelling of new FINALFUNC_MODIFY aggregate attribute. I'd used
SHARABLE as a value originally, but Peter Eisentraut points out that
dictionaries agree that SHAREABLE is the preferred spelling. Run around and
change that before it's too late. Discussion:

- Doc: preliminary list of PG11 major features. This might get bike-shedded a
bit later, but it's better than shipping beta1 with no list. Jonathan Katz

- Stamp 11beta1.

- Widen COPY FROM's current-line-number counter from 32 to 64 bits. Because the
code for the HEADER option skips a line when this counter is zero, a very long
COPY FROM WITH HEADER operation would drop a line every 2^32 lines. A lesser
but still unfortunate problem is that errors would show a wrong input line
number for errors occurring beyond the 2^31'st input line. While such large
input streams seemed impractical when this code was first written, they're not
any more. Widening the counter (and some associated variables) to uint64
should be enough to prevent problems for the foreseeable future. David Rowley

- Fix incorrect ordering of operations in pg_resetwal and pg_rewind. Commit
c37b3d08c dropped its added GetDataDirectoryCreatePerm call into the wrong
place in pg_resetwal.c, namely after the chdir to DataDir. That broke
invocations using a relative path, as reported by Tushar Ahuja. We could have
left it where it was and changed the argument to be ".", but that'd result in
a rather confusing error message in event of a failure, so re-ordering seems
like a better solution. Similarly reorder operations in pg_rewind.c. The
issue there is that it doesn't seem like a good idea to do any actual
operations before the not-root check (on Unix) or the restricted token
acquisition (on Windows). I don't know that this is an actual bug, but I'm
definitely not convinced that it isn't, either. Assorted other code review
for c37b3d08c and da9b580d8: fix some misspelled or otherwise badly worded
comments, put the #include for <sys/stat.h> where it actually belongs, etc.

- Remove configure's check for nonstandard "long long" printf modifiers. We
used to claim to support platforms using 'q' or 'I64' as the printf length
modifier for long long int, by dint of replacing snprintf with our own code
which uses the C99 standard 'll' modifier. But that is only adequate if we
use INT64_MODIFIER only in snprintf-based calls, not directly with the
platform's native printf or fprintf. Which hasn't been the case for years.
We had not noticed, partially because of inadequate test coverage, and
partially because the buildfarm is almost completely bare of machines that
won't take 'll'. The last one seems to have been frogmouth, which was
adjusted recently so that it will take 'll'. We might as well just give up on
the pretense that anything else works, and save ourselves some configure
cycles. Discussion: https://postgr.es/m/13103.1526749980@sss.pgh.pa.us
Discussion: https://postgr.es/m/24769.1526772680@sss.pgh.pa.us

- Fix simple_prompt() to disable echo on Windows when stdin != terminal. If
echo = false, simple_prompt() is supposed to prevent echoing the input (for
password input). However, the Windows implementation applied the mode change
to STD_INPUT_HANDLE. That would not have the desired effect if stdin isn't
actually the terminal, for instance if the user is piping something into psql.
Fix it to apply the mode change to the correct input file, so that passwords
do not echo in such cases. In passing, shorten and de-uglify this code by
using #elif rather than an #if nest and removing some duplicated code.
Back-patch to all supported versions. To simplify that, also back-patch the
portions of commit 9daec77e1 that got rid of an unnecessary malloc/free in the
same area. Matthew Stickney (cosmetic changes by me) Discussion:

- Properly schema-qualify additional object types in getObjectDescription().
Collations, conversions, extended statistics objects (in >= v10), and all four
types of text search objects have schema-qualified names.
getObjectDescription() ignored that and would emit just the base name of the
object, potentially producing wrong or at least highly misleading output. Fix
it to add the schema name whenever the object is not "visible" in the current
search path, as is the rule for other schema-qualifiable object types.
Although in common situations the output won't change, this seems to me (tgl)
to be a bug worthy of back-patching, hence do so. Kyotaro Horiguchi, per a
complaint from me Discussion:

- Fix objectaddress.c code for publication relations. getObjectDescription and
getObjectIdentity failed to schema-qualify the name of the published table,
which is bad in getObjectDescription and unforgivable in getObjectIdentity.
Actually, getObjectIdentity failed to emit the table's name at all unless
"objname" output is requested, which accidentally works for some (all?) extant
callers but is clearly not the intended API. Somebody had also not gotten the
memo that the output of getObjectIdentity is not to be translated. To fix
getObjectDescription, I made it call getRelationDescription, which required
refactoring the translatable string for the case, but is more future-proof in
case we ever publish relations that aren't plain tables. While at it, I made
the English output look like "publication of table X in publication Y"; the
added "of" seems to me to make it read much better. Back-patch to v10 where
publications were introduced. Discussion:

- Improve translatability of some getObjectDescription() messages. Refactor
some cases in getObjectDescription so that the translator has more control
over phrase order in the translated messages. This doesn't cause any changes
in the English results. (I was sorely tempted to reorder "... belonging to
role %s in schema %s" into "... in schema %s belonging to role %s", but
refrained.) In principle we could back-patch this, but since translators have
not complained about these cases previously, it seems better not to thrash the
translatable strings in back branches. Kyotaro Horiguchi, tweaked a bit by me

- Improve English wording of some other getObjectDescription() messages. Print
columns as "column C of <relation>" rather than "<relation> column C". This
seems to read noticeably better in English, as evidenced by the regression
test output changes, and the code change also makes it possible for
translators to adjust the phrase order in other languages. Also change the
output for OCLASS_DEFAULT from "default for %s" to "default value for %s".
This seems to read better and is also more consistent with the output of, for
instance, getObjectTypeDescription(). Kyotaro Horiguchi, per a complaint from
me Discussion:

- Update sepgsql regression test output for getObjectDescription() changes.
Missed in commit b86b7bfa3. Per buildfarm.

- Update non-default collation tests for getObjectDescription() changes. Sigh,
also missed in commit b86b7bfa3. Per buildfarm.

- Fix misidentification of SQL statement type in plpgsql's exec_stmt_execsql.
To distinguish SQL statements that are INSERT/UPDATE/DELETE from other ones,
exec_stmt_execsql looked at the post-rewrite form of the statement rather than
the original. This is problematic because it did that only during first
execution of the statement (in a session), but the correct answer could change
later due to addition or removal of DO INSTEAD rules during the session. That
could lead to an Assert failure, as reported by Tushar Ahuja and Robert Haas.
In non-assert builds, there's a hazard that we would fail to enforce STRICT
behavior when we'd be expected to. That would happen if an initially present
DO INSTEAD, that replaced the original statement with one of a different type,
were removed; after that the statement should act "normally", including
strictness enforcement, but it didn't. (The converse case of enforcing
strictness when we shouldn't doesn't seem to be a hazard, as addition of a DO
INSTEAD that changes the statement type would always lead to acting as though
the statement returned zero rows, so that the strictness error could not
fire.) To fix, inspect the original form of the statement not the post-rewrite
form, making it valid to assume the answer can't change intra-session. This
should lead to the same answer in every case except when there is a DO INSTEAD
that changes the statement type; we will now set mod_stmt=true anyway, while
we would not have done so before. That breaks the Assert in the
SPI_OK_REWRITTEN code path, which expected the latter behavior. It might be
all right to assert mod_stmt rather than !mod_stmt there, but I'm not entirely
convinced that that'd always hold, so just remove the assertion altogether.
This has been broken for a long time, so back-patch to all supported branches.

- Update a couple of long-obsolete comments in pg_type.h.

Peter Eisentraut pushed:

- pg_basebackup: Remove short option -k. -k meant --no-verify-checksums, which
is the opposite of what initdb uses -k for. After discussion, a short option
does not seem necessary, so just keep the long option. Discussion:

- doc: Fix some whitespace issues.

- Update key words table for version 11.

- Translation updates. Source-Git-URL:
git://git.postgresql.org/git/pgtranslation/messages.git Source-Git-Hash:

- doc: Whitespace fixes in man pages.

- doc: Fix some trailing whitespace.

- doc: Use = after long options in documentation. It's good for consistency and
makes the examples easier to read.

- Update SQL features list.

Andrew Gierth pushed:

- Fix SQL:2008 FETCH FIRST syntax to allow parameters. OFFSET <x> ROWS FETCH
FIRST <y> ROWS ONLY syntax is supposed to accept <simple value specification>,
which includes parameters as well as literals. When this syntax was added all
those years ago, it was done inconsistently, with <x> and <y> being different
subsets of the standard syntax. Rectify that by making <x> and <y> accept the
same thing, and allowing either a (signed) numeric literal or a c_expr there,
which allows for parameters, variables, and parenthesized arbitrary
expressions. Per bug #15200 from Lukas Eder. Backpatch all the way, since
this has been broken from the start. Discussion:
https://postgr.es/m/877enz476l.fsf@news-spur.riddles.org.uk Discussion:

Heikki Linnakangas pushed:

- Fix typo in comment.

- Add missing files to src/backend/lib/README. The README lists all the files
available in the directory, along with short descriptions of each, but a few
newly added ones were missing. While we're at it, reorder the list into
alphabetical order. Author: Takeshi Ideriha Discussion:

- Accept "B" in all memory-unit GUCs, and improve error messages. Commit
6e7baa3227 added support for "B" unit, for specifying config options in bytes.
However, it was only accepted in GUC_UNIT_BYTE settings, wal_segment_size and
track_activity_query_size, and not e.g. in work_mem. This patch makes it
consistent, so that "B" accepted in all the same contexts where "kB", "MB",
and so forth are accepted. Add "B" to the list of accepted units in the error
hint, along with "kB", "MB", etc. Add an entry in the conversion table for
"TB" to "B" conversion. A terabyte is out of range for any GUC_UNIT_BYTE
option, so you always get an "out of range" error with that, but without it,
you get a confusing error message that claims that "TB" is not an accepted
unit, with a hint that nevertheless lists "TB" as an accepted unit.
Reviewed-by: Alexander Korotkov, Andres Freund Discussion:

Bruce Momjian pushed:

- doc: PG 11 release note fixes: PGhost, typo.

- doc: PG 11 release notes, add third author.

- doc: PG 11 release notes fix for pg_dump --create, author.

- doc: PG 11 rel notes: add PL/pgSQL composite DDL item. Reported-by: Tom

Andrew Dunstan pushed:

- Preserve information on use of git-external-diff. Now that the Working with
git wiki page no longer suggests producing context diffs, we should preserve
the information on how to use git-external-diff for those people who want to
view context format diffs. The most obvious place is in the script itself, so
that's what's done here.

- Don't force a blank line before comments in perl code. Suggestion from Bruce
Momjian Discussion: https://postgr.es/m/20180525190445.GA2213@momjian.us

- Don't fall off the end of perl functions. This complies with the perlcritic
policy Subroutines::RequireFinalReturn, which is a severity 4 policy. Since we
only currently check at severity level 5, the policy is raised to that level
until we move to level 4 or lower, so that any new infringements will be
caught. A small cosmetic piece of tidying of the pgperlcritic script is
included. Mike Blackwell Discussion:

- Avoid use of unportable hex constant in convutils.pm. Discussion:

Magnus Hagander pushed:

- Remove incorrect statement about IPC configuration on OpenBSD.
kern.ipc.shm_use_phys is not a sysctl on OpenBSD, and SEMMAP is not a kernel
configuration option. These were probably copy pasteos from when the
documentation had a single paragraph for *BSD. Author: Daniel Gustafsson

== Pending Patches ==

Marina Polyakova sent in another revision of a patch to fix serialization and
deadlock errors in pgbench.

Carter Thaxton sent in three revisions of a patch to add an
--include-table-data-where option to pg_dump, to export only a subset of table

Masahiko Sawada sent in another revision of a patch to move relation extension
locks out of heavyweight lock manager.

Andres Freund sent in two more revisions of a patch to fix some fsync issues.

Michaël Paquier sent in a patch to rework scram_channel_binding to protect from
downgrade attacks.

Heikki Linnakangas sent in a patch to enable caching subquery results.

Michaël Paquier sent in two more revisions of a patch to fix some error handling
for read() and errno.

Masahiko Sawada sent in a patch to fix a possible bug in logical replication by
ensuring that the next record found is valid.

Robbie Harwood sent in three more revisions of a patch to enable GSSAPI

Laurenz Albe sent in a patch to ensure that unlogged tables don't get locked.

Michaël Paquier sent in another revision of a patch to prevent PANIC during
crash recovery of a recently promoted standby.

Justin Pryzby sent in two revisions of a patch to improve the documentation on
partition pruning.

Michaël Paquier sent in another revision of a patch to simplify final sync in
pg_rewind's target folder and add --no-sync.

Marina Polyakova sent in another revision of a patch to precalculate stable or
immutable functions, stable or immutable operators and other nonvolatile

Ashwin Agrawal sent in a patch to avert tablespace path collision for primary
and standby.

Kyotaro HORIGUCHI sent in a patch to set debug_query_string in some places where
it is not already being set.

Michaël Paquier sent in a patch to make pg_replication_slot_advance return NULL
instead of 0/0 when the slot is not advanced.

Kyotaro HORIGUCHI sent in two revisions of a patch to fix the fact that
XLogWrite was uing palloc within a critical section.

Thomas Munro sent in a patch to implement UNDO logs.

Vik Fearing sent in a patch to implement the PERIOD type per the SQL standard.

Andrew Dunstan sent in another revision of a patch to fix some Perl warnings
under MSVC.

Mark Rofail sent in another revision of a patch to implement foreign key arrays.

Browse pgsql-announce by date

  From Date Subject
Next Message Huong Dangminh 2018-05-28 02:24:35 RE: PostgreSQL 2018-05-10 Security Update Release
Previous Message Magnus Hagander 2018-05-25 08:16:20 Re: PostgreSQL 2018-05-10 Security Update Release