== PostgreSQL Weekly News - January 21 2018 ==

From: David Fetter <david(at)fetter(dot)org>
To: PostgreSQL Announce <pgsql-announce(at)postgresql(dot)org>
Subject: == PostgreSQL Weekly News - January 21 2018 ==
Date: 2018-01-21 20:06:07
Message-ID: 20180121200607.GA4938@fetter.org
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-announce

== PostgreSQL Weekly News - January 21 2018 ==

== PostgreSQL Product News ==

pg_back 1.4, a backup script for PostgreSQL, released.

PostGIS 2.4.3 and 2.3.6, the industry standard geographic information
system package for PostgreSQL, released.

OmniDB 2.4.1, a browser-based database management tool, released.

repmgr 4.0.2, a replication manager for PostgreSQL, released.

Database Designer for PostgreSQL 1.12.2 released.

== PostgreSQL Jobs for January ==


== PostgreSQL Local ==

FOSDEM PGDay 2018, a one day conference held before the main FOSDEM event will
be held in Brussels, Belgium, on Feb 2nd, 2018.

Prague PostgreSQL Developer Day 2018 (P2D2 2018) is a two-day
conference that will be held on February 14-15 2018 in Prague, Czech Republic.

PGConf India 2018 will be on February 22-23, 2018 in Bengaluru, Karnataka.

PostgreSQL(at)SCaLE is a two day, two track event which takes place on
March 8-9, 2018, at Pasadena Convention Center, as part of SCaLE 16X.

Nordic PGDay 2018 will be held in Oslo, Norway, at the Radisson Blu Hotel
Nydalen, on March 13, 2018. The CfP is open through December 31, 2017 at

pgDay Paris 2018 will be held in Paris, France at the Espace Saint-Martin, on
March 15 2018. The CfP is open until December 31, 2017.

PGConf APAC 2018 will be held in Singapore March 22-23, 2018.

The German-speaking PostgreSQL Conference 2018 will take place on April 13th,
2018 in Berlin.

PGConfNepal 2018 will be held May 4-5, 2018 at Kathmandu University, Dhulikhel,
Nepal. The CfP is open until February 1, 2018 at

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

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

== 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 ==

Peter Eisentraut pushed:

- Remove useless use of bit-masking macros. In this case, the macros
SET_8_BYTES(), GET_8_BYTES(), SET_4_BYTES(), GET_4_BYTES() are no-ops, so we
can just remove them. The plan is to perhaps remove them from the source code
altogether, so we'll start here. Discussion:

- doc: Expand documentation of session_replication_role.

- Add tests for session_replication_role. This was hardly tested at all. The
trigger case was lightly tested by the logical replication tests, but rules
and event triggers were not tested at all.

- Fix typo and improve punctuation.

- Update comment. The "callback" that this comment was referring to was removed
by commit c0a15e07cd718cb6e455e68328f522ac076a0e4b, so update to match the
current code.

- Replace GrantObjectType with ObjectType. There used to be a lot of different
*Type and *Kind symbol groups to address objects within different commands,
most of which have been replaced by ObjectType, starting with
b256f2426433c56b4bea3a8102757749885b81ba. But this conversion was never done
for the ACL commands until now. This change ends up being just a plain
replacement of the types and symbols, without any code restructuring needed,
except deleting some now redundant code. Reviewed-by: Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> Reviewed-by: Stephen Frost <sfrost(at)snowman(dot)net>

- Replace AclObjectKind with ObjectType. AclObjectKind was basically just
another enumeration for object types, and we already have a preferred one for
that. It's only used in aclcheck_error. By using ObjectType instead, we can
also give some more precise error messages, for example "index" instead of
"relation". Reviewed-by: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>

- PL/Python: Simplify PLyLong_FromInt64. We don't actually need two code paths,
one for 32 bits and one for 64 bits. Since the existing code already assumed
that "long long" is available, we can just use PyLong_FromLongLong() for 64
bits as well. In Python 2.5 and later, PyLong_FromLong() and
PyLong_FromLongLong() use the same code, so there will be no difference for
64-bit platforms. In Python 2.4, the code is different, but performance
testing showed no noticeable difference in PL/Python, and that Python version
is ancient anyway. Discussion:

- Improve type conversion of SPI_processed in Python. The previous code
converted SPI_processed to a Python float if it didn't fit into a Python int.
But Python longs have unlimited precision, so use that instead in all cases.
As in eee50a8d4c389171ad5180568a7221f7e9b28f09, we use the Python LongLong API
unconditionally for simplicity. Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

Andrew Dunstan pushed:

- Fix compiler warnings due to commit cc4feded.

- Centralize json and jsonb handling of datetime types. The creates a single
function JsonEncodeDateTime which will format these data types in an efficient
and consistent manner. This will be all the more important when we come to
jsonpath so we don't have to implement yet more code doing the same thing in
two more places. This also extends the code to handle time and timetz types
which were not previously handled specially. This requires exposing the
time2tm and timetz2tm functions. Patch from Nikita Glukhov

Simon Riggs pushed:

- Ability to advance replication slots. Ability to advance both physical and
logical replication slots using a new user function
pg_replication_slot_advance(). For logical advance that means records are
consumed as fast as possible and changes are not given to output plugin for
sending. Makes 2nd phase (after we reached SNAPBUILD_FULL_SNAPSHOT) of
replication slot creation faster, especially when there are big transactions
as the reorder buffer does not have to deal with data changes and does not
have to spill to disk. Author: Petr Jelinek Reviewed-by: Simon Riggs

- Fix typo in recent commit. Typo in 9c7d06d60680c7f00d931233873dee81fdb311c6
Reported-by: Masahiko Sawada

Tom Lane pushed:

- Remove useless lookup of root partitioned rel in ExecInitModifyTable().
node->partitioned_rels is only set in UPDATE/DELETE cases, but
ExecInitModifyTable only uses its "rel" variable in INSERT cases, so the extra
logic to find the root rel is just a waste of complexity and cycles. Etsuro
Fujita, reviewed by Amit Langote Discussion:

- Extend configure's __int128 test to check for a known gcc bug. On Sparc64,
use of __attribute__(aligned(8)) with __int128 causes faulty code generation
in gcc versions at least through 5.5.0. We can work around that by disabling
use of __int128, so teach configure to test for the bug. This solution
doesn't fix things for the case of cross-compiling with a buggy compiler; to
support that nicely, we'd need to add a manual disable switch. Unless more
such cases turn up, it doesn't seem worth the work. Affected users could
always edit pg_config.h manually. In passing, fix some typos in the existing
configure test for __int128. They're harmless because we only compile that
code not run it, but they're still confusing for anyone looking at it closely.
This is needed in support of commit 751804998, so back-patch to 9.5 as that
was. Marina Polyakova, Victor Wagner, Tom Lane Discussion:

- Suppress possibly-uninitialized-variable warnings. Apparently, Peter's
compiler has faith that the switch test values here could never not be valid
values of their enums. Mine does not, and I tend to agree with it.

Robert Haas pushed:

- postgres_fdw: Avoid 'outer pathkeys do not match mergeclauses' error. When
pushing down a join to a foreign server, postgres_fdw constructs an
alternative plan to be used for any EvalPlanQual rechecks that prove to be
necessary. This plan is stored as the outer subplan of the Foreign Scan
implementing the pushed-down join. Previously, this alternative plan could
have a different nominal sort ordering than its parent, which seemed OK since
there will only be one tuple per base table anyway in the case of an
EvalPlanQual recheck. Actually, though, it caused a problem if that path was
used as a building block for the EvalPlanQual recheck plan of a higher-level
foreign join, because we could end up with a merge join one of whose inputs
was not labelled with the correct sort order. Repair by injecting an extra
Sort node into the EvalPlanQual recheck plan whenever it would otherwise fail
to be sorted at least as well as its parent Foreign Scan. Report by Jeff
Janes. Patch by me, reviewed by Tom Lane, who also provided the test case and
comment text. Discussion:

- Transfer state pertaining to pending REINDEX operations to workers. This will
allow the pending patch for parallel CREATE INDEX to work on system catalogs,
and to provide the same level of protection against use of user indexes while
they are being rebuilt that we have for non-parallel CREATE INDEX. Patch by
me, reviewed by Peter Geoghegan. Discussion:

- Allow UPDATE to move rows between partitions. When an UPDATE causes a row to
no longer match the partition constraint, try to move it to a different
partition where it does match the partition constraint. In essence, the
UPDATE is split into a DELETE from the old partition and an INSERT into the
new one. This can lead to surprising behavior in concurrency scenarios
because EvalPlanQual rechecks won't work as they normally did; the known
problems are documented. (There is a pending patch to improve the situation
further, but it needs more review.) Amit Khandekar, reviewed and tested by
Amit Langote, David Rowley, Rajkumar Raghuwanshi, Dilip Kumar, Amul Sul,
Thomas Munro, Álvaro Herrera, Amit Kapila, and me. A few final revisions by
me. Discussion:

Bruce Momjian pushed:

- Reorder C includes. Reorder header files in joinrels.c and pathnode.c in
alphabetical order, removing unnecessary ones. Author: Etsuro Fujita

- doc: update intermediate certificate instructions. Document how to properly
create root and intermediate certificates using v3_ca extensions and where to
place intermediate certificates so they are properly transferred to the remote
side with the leaf certificate to link to the remote root certificate. This
corrects docs that used to say that intermediate certificates must be stored
with the root certificate. Also add instructions on how to create root,
intermediate, and leaf certificates. Discussion:
https://postgr.es/m/20180116002238.GC12724@momjian.us Reviewed-by: Michael
Paquier Backpatch-through: 9.3

Álvaro Herrera pushed:

- Fix StoreCatalogInheritance1 to use 32bit inhseqno. For no apparent reason,
this function was using a 16bit-wide inhseqno value, rather than the correct
32 bit width which is what is stored in the pg_inherits catalog. This becomes
evident if you try to create a table with more than 65535 parents, because
this error appears: ERROR: duplicate key value violates unique constraint
«pg_inherits_relid_seqno_index» DETAIL: Key (inhrelid, inhseqno)=(329371, 0)
already exists. Needless to say, having so many parents is an uncommon
situations, which explains why this error has never been reported despite
being having been introduced with the Postgres95 1.01 sources in commit
Backpatch all the way back. David Rowley noticed this while reviewing a patch
of mine. Discussion:

- Fix regression tests for better stability. Per buildfarm

- Fix pg_dump version comparison. I missed a '0' in the version number string
... Per buildfarm member crake.

- Local partitioned indexes. When CREATE INDEX is run on a partitioned table,
create catalog entries for an index on the partitioned table (which is just a
placeholder since the table proper has no data of its own), and recurse to
create actual indexes on the existing partitions; create them in future
partitions also. As a convenience gadget, if the new index definition matches
some existing index in partitions, these are picked up and used instead of
creating new ones. Whichever way these indexes come about, they become
attached to the index on the parent table and are dropped alongside it, and
cannot be dropped on isolation unless they are detached first. To support
pg_dump'ing these indexes, add commands CREATE INDEX ON ONLY <table> (which
creates the index on the parent partitioned table, without recursing) and
ALTER INDEX ATTACH PARTITION (which is used after the indexes have been
created individually on each partition, to attach them to the parent index).
These reconstruct prior database state exactly. Reviewed-by: (in alphabetical
order) Peter Eisentraut, Robert Haas, Amit Langote, Jesper Pedersen, Simon
Riggs, David Rowley Discussion:

- Fix CompareIndexInfo's attnum comparisons. When an index column is an
expression, it makes no sense to compare its attribute numbers. This seems to
account for remaining buildfarm fallout from 8b08f7d4820f. At least, it
solves the issue in my local 32bit VM -- let's see what the rest thinks.

Magnus Hagander pushed:

- Fix wording of "hostaddrs". The field is still called "hostaddr", so make
sure references use "hostaddr values" instead. Author: Michael Paquier

- Support huge pages on Windows. Add support for huge pages (called large pages
on Windows) to the Windows build. This (probably) breaks compatibility with
Windows versions prior to Windows 2003 or Windows Vista. Authors: Takayuki
Tsunakawa and Thomas Munro Reviewed by: Magnus Hagander, Amit Kapila

== Pending Patches ==

Ildus Kurbangaliev sent in another revision of a patch to create custom
compression methods.

Masahiko Sawada sent in a patch to fix a README in nbtree to reflect current

Michaël Paquier sent in a patch to remove WITH clause support in CREATE FUNCTION
for isCachable and isStrict.

Fabien COELHO sent in another revision of a patch to add \if to pgbench.

Joe Wildish sent in another revision of a patch to implement SQL ASSERTIONs.

Haribabu Kommi sent in another revision of a patch to enhance
pg_stat_wal_receiver view to display connected host.

Robert Haas sent in another revision of a patch to make "quit" and "exit" Do The
Right Thing™ in psql.

Marco Nenciarini sent in two more revisions of a patch to implement logical
decoding of TRUNCATE.

Shubham Barai sent in another revision of a patch to predicate Locking in hash

Marina Polyakova sent in another revision of a patch to add the infrastructure
for pre-calculating STABLE functions.

Alexander Korotkov sent in another revision of a patch to count tuples correctly
during GiST VACUUM of partial indexes.

Andrew Dunstan sent in another revision of a patch to speed up adding a column
with a DEFAULT to a table.

Amit Langote sent in a patch to ensure that partitioned tables do not have TOAST
tables created for them.

Geoff Winkless sent in a patch to psql to handle EOF correctly when readline is

Ildar Musin sent in two more revisions of a patch to create general purpose
hashing functions in pgbench.

Peter Eisentraut sent in another revision of a patch to implement GENERATED
columns per the SQL standard.

Yuto Hayamizu sent in another revision of a patch to mitigate filter cost

Amit Langote and David Rowley traded patches to speed up partition pruning.

Peter Eisentraut sent in another revision of a patch to implement transaction
control in procedures.

Yoshimi Ichiyanagi sent in a patch to apply PMDK to WAL operations for
persistent memory.

Peter Geoghegan sent in two more revisions of a patch to add parallel B-tree
index build sorting.

Andrey Borodin sent in two more revisions of a patch to implement a GiST vacuum.

Anastasia Lubennikova sent in two more revisions of a patch to implement
covering + unique indexes.

Claudio Freire sent in another revision of a patch to vacuum which makes it
update the FSM more frequently.

Claudio Freire sent in another revision of a patch to enable VACUUM to use more
than 1GB of work_mem.

Nikolay Shaplov sent in another revision of a patch to skip setting toast.*
reloptions when a TOAST table does not exist.

Konstantin Knizhnik sent in three revisions of a patch to implement built-in
connection pooling.

Robert Haas sent in another revision of a patch to sort epq path if needed.

Robert Haas sent in a patch to propagate REINDEX state.

David Gould sent in a patch to fix a bug where ANALYZE can cause
pg_class.reltuples to be wildly exaggerated.

Etsuro Fujita sent in another revision of a patch to fix WCO handling in the
PostgreSQL FDW.

Fabien COELHO sent in another revision of a patch to add a pgbench progress

Jeevan Chalke sent in another revision of a patch to implement partition-wise

Antonin Houska sent in a patch to fix possible gaps/garbage in the output of
the XLOG reader.

Simon Riggs sent in another revision of a patch to implement MERGE.

Fabien COELHO sent in another revision of a patch to add --random-seed to

Kyotaro HORIGUCHI sent in two more revisions of a patch to fix an issue where an
index-only scan would return incorrect results when using a composite GIST index
with a gist_trgm_ops column.

Peter Eisentraut sent in a patch to create constraint triggers to fire ALWAYS,
which ensures that all constraints are also enforced on logical replicas.

Álvaro Herrera sent in a patch to add tests for pg_dump for local indexes on
partitoned tables.

Robert Haas sent in another revision of a patch to handle parallel worker fork
failures better.

Amit Langote sent in two revisions of a patch to add assorted partition
reporting functions.

Haribabu Kommi sent in another revision of a patch to refactor handling of
database attributes between pg_dump and pg_dumpall.

Marco Nenciarini sent in another revision of a patch to TRUNCATE to make it
ignore foreign keys in ROLE_REPLICA.

Liudmila Mantrova sent in another revision of a patch to fix some documentation
inconsistencies in pg_trgm word_similarity.

Jörg Westheide sent in a patch to make "make check" work on MacOS when SIP is

Konstantin Knizhnik sent in another revision of a patch to optimize secondary
index access.

Amit Langote sent in another revision of a patch to teach CopyFrom to use
ModifyTableState for tuple-routing, refactor ExecFindPartition and
ExecSetupPartitionTupleRouting, and ensure that during tuple-routing,
per-partition objects are initialized lazily.

Tomas Vondra sent in two more revisions of a patch to add logical_work_mem and
use same to constrain memory usage for logical replication.

Peter Eisentraut sent in another revision of a patch to implement GNU TLS

Etsuro Fujita sent in a patch to update some regression tests for the PostgreSQL

David Steele sent in another revision of a patch to make a configurable file
mode mask for the PostgreSQL directories.

Jing Wang sent in another revision of a patch to support COMMENT ON DATABASE

Tom Lane sent in a patch to pg_dump to make TOC tags reliably distinguishable
and dump comments in a more uniform order.

Tom Lane sent in another revision of a patch to refactor handling of database
attributes between pg_dump and pg_dumpall.

Browse pgsql-announce by date

  From Date Subject
Next Message Vik Fearing 2018-01-22 11:37:00 pgDay Paris 2018
Previous Message Monica Real Amores 2018-01-18 12:07:39 repmgr 4.0.2 Now Available