PostgreSQL 9.6 Open Items

== Open Issues ==
* Oddity in EXPLAIN for foreign/custom join pushdown plans
** postgres_fdw produces incorrect aliases for joining relations shown in EXPLAIN for some join pushdown queries
** low-priority issue; let's leave this for v10
== Resolved Issues ==
=== resolved after 9.6rc1 ===
* Scan of 2PC state files is broken at recovery
** Fixed in 
=== resolved after 9.6beta4 ===
* ()
* ()
* What should the default max_parallel_degree be?
** We chose to disable it by default for 9.6; done in 
* unstable regression test for speculative-insertion-with-TOAST bug
** initial indications are that was sufficient
* parallel query error handling fails in non-English locales
** fixed by 
=== resolved after 9.6beta3 ===
* 
** fixed in 
* 
** owner: Stephen Frost 
** patch sent for review
** Fixed in 
* 
** It's already wrong in 9.5, but that seems like a bad reason for not fixing it now
** fixed in 
* heap_lock_tuple can panic the server
** original commit: (principal author: Masahiko Sawada; owner: Andres Freund )
** fixed in 
* 
** it looks like this example also exposes an independent bug in array_to_tsvector, which is also new in 9.6.
** fixed in and 
* 
** original commit: (principal author: Kevin Grittner; owner: Robert Haas )
** ownership transferred from Kevin Grittner to RMT and then to Robert Haas
** patch v1
** fixed in 
** 3e2f3c2e has caused a new regression
** Addressed regression with and 
=== resolved after 9.6beta2 ===
* change definition of phrase search to not match a single word?
** Several issues here, fixed in commits , , 
* consider whether MinMaxAggPath could be be parallel-safe
** owner: Robert Haas 
** analysis and status
** no changes required
* parallel aggregation is quite broken with polymorphic aggregates
** Multiple issues here, fixed in commits , , , , , 
* parallel workers and client encoding
** owner: Robert Haas 
** fixed in 
* set consider_parallel correctly for upper rels
** owner: Robert Haas 
** and then remove wholePlanParallelSafe flag
** rhaas needs help
** fixed in 
* crashes in RestoreSnapshot on hot standby
** fixed in 
* Broken handling of lwlocknames.h
** fixed in 
* fix possible confusion between subqueries and subplans
** old thread
** Fixed in and 
* 
** original commit: (principal author: Michael Paquier; owner: Alvaro Herrera )
** There have been concerns about making potentially password values visible at SQL level, patch v3 adds a routine to libpqwalreceiver to return back to caller an obfuscated connection string that gets saved in shared memory. Then pg_stat_wal_receiver makes use of it.
** CLOSE_WAIT for now due to not-quite-finished discussion about security implications
* temp_file_limit + parallel query issue
** The temp_file_limit documentation should be updated.
** fixed in 
* Bug in batch tuplesort memory CLUSTER case
** patch available
** original commit: (principal author: Peter Geoghegan; owner: Robert Haas )
** fixed in 
* 
** original commit: (principal author: Magnus Hagander; owner: Magnus Hagander )
** , reviewed by Michael.
** fixed in 
* 
** fixed in 
* 
** fixed in 
* 
** fixed in 
* dumping database privileges broken in 9.6
** original commit: (principal author: Stephen Frost; owner: Stephen Frost )
** fixed in 
* heap_update sets xmax and infomask without logging the changes or clearing PD_ALL_VISIBLE or visibility map bits
** 
** This has been buggy essentially forever but the freeze map changes give it new urgency.
** fixed in 
* heap_lock_tuple failed to clear all-frozen bit
** fixed in 
=== resolved after 9.6beta1 ===
* bloom extension does not dump and restore properly
** original commit: (principal author: Stephen Frost; owner: Stephen Frost )
** (Michael): Not limited to bloom but to all access methods. Some code lookup is pointing out that checkExtensionMembership() in selectDumpableAccessMethod does not consider the fact that access methods do not have ACLs.
** (Stephen): Fixed in , which corrected dumpAccessMethod() to check which bits are set in the dump bitfield and to only dump out the components requested.
* 
** original commit: (principal author: Stephen Frost; committer: Stephen Frost )
** Points (2) and (3) constitute this open item. Point (1) is just questions.
** made improvements, but is that enough?
* 
** original commit: (principal author: Stephen Frost; committer: Stephen Frost)
** Restrictions on roles in the pg_ namespace were removed, per discussion, turning this into an intentionally allowed operation.
* Access methods lack support for COMMENT and have no psql-level meta command
** original commit: (principal author: Alexander Korotkov; owner: Alvaro Herrera )
** fixed in 
* 
** original commit: (committer: Stephen Frost)
** fixed in 
* DROP ACCESS METHOD IF EXISTS isn't implemented
** fixed in 
* bloom index error with unlogged table
** fixed in 
* need to address freeze map review comments
** original commit: (principal author: Masahiko Sawada; owner: Robert Haas )
** fixed in , , , 
* Failed assertions on parallel worker shutdown
** owner: Robert Haas 
** fixed in , 
* should we revert "Use Foreign Key relationships to infer multi-column join selectivity" entirely?
** original commit: (principal author: Tomas Vondra and David Rowley; owner: Tom Lane )
** Resolved by revert ()
* bloom documentation should be reworked
** fixed in cfd4804b1ebed8108ef6caedc76fb6eb37bc9724
* Basic test coverage of parallelism
** owner: Noah Misch 
** patch available, committed as 
* rename max_parallel_degree to max_parallel_workers_per_gather
** original commit: (principal author: Amit Kapila; owner: Robert Haas )
** fixed in 
* Failed assertion in parallel worker (ExecInitSubPlan)
** owner: Robert Haas 
** fixed in , although we suspect other bugs in this area
* "snapshot too old" feature considered not ready for 9.6 by some
** original commit: (principal author: Kevin Grittner; owner: Kevin Grittner )
** Andres considering revert, Bruce considering revert, Tom considering revert
** CREATE INDEX may need work to avoid missing rows fixed in 
** ANALYZE of functional index that takes longer than old_snapshot_threshold may error out and fail to update statistics Analysis suggesting that this is not a problem
** there is a not a consensus to revert this; whatever specific defects exist should be separately tracked
* Failed assertion in postgres_fdw/deparse.c
** original commit: (principal author: Shigeru Hanada; owner: Robert Haas )
** proposal of patch
** fixed in 
* idle_in_transaction_session_timeout patch overlooked pg_dump
** fixed in 
* data-corrupting bug in lazy_scan_heap()
** original commit: (principal author: Masahiko Sawada; owner: Robert Haas status)
* add integrity-checking functions to pg_visibility extension
** fixed in 
* what to do with parallel worker errcontext()?
** Should we have it at all? Maybe only for debugging? (If so, controlled how?) Unless we remove it entirely, the misbehavior shown in above message needs to be fixed.
** analysis and explanation by rhaas
** fixed in 
* provide a way to force a rebuild of the visibility map
* ERROR: ORDER/GROUP BY expression not found in targetlist
** git bisect is pointing out to 04ae11f6 as the culprit
** six separate issues have been raised on this thread
*** #1 fixed in , 
*** #2 fixed in , 
*** #3 fixed in 
*** separate open items added for #4, #5, #6
* flush control causes performance regressions
** owner: Andres Freund 
** parallel copy 9x slower
** pgbench 45% slower
** Fixed in 
* commit ac1d794 hurts performance
** original commit: (principal author: Rajeev Rastogi; owner: Robert Haas )
** hopefully resolved by Andres, per 
** no reply from original poster as of 2016-03-25
** Mithun CY re-reported this problem 2016-05-06 - apparently, it's not fixed yet
** possibly fixed after all?
=== resolved before 9.6beta1 ===
* fd.c: flush data problems on osx
** original commit: 428b1d6b29ca599c5700d4bc4f4ce4c5880369bf (principal author: Fabien Coelho; committer: Andres Freund )
* 
** original commit: (committer: Andres Freund)
** fixed in 
* Logical decoding timeline following (commits were reverted, feature no longer in tree)
* crash/assertion failure in postgres_fdw with three-table joins, fixed by 3151f16e.
* Some messages of pg_rewind --debug not getting translated, fixed by cad3edef.
* incorrect doc for pgbench log format. The part about latency limit description in the log format should be backported to 9.5.
** fixed by d797bf7 and 7f0a2c8
* Recovery test failure for recovery_min_apply_delay
** original commit: 49148645f7f30f461b09618b5342b37425f33b22 (principal author: Michael Paquier; committer: Alvaro Herrera )
* Parallel aggregates can't be declared safe
** original commit: e06a38965b3bcdaa881e7e06892d4d8ab6c2c980 (principal author: David Rowley; committer: Robert Haas)
** fixed by 41ea0c23
* 
** original commits e06a38965b3bcdaa881e7e06892d4d8ab6c2c980, 5fe5a2cee91117673e04617aeb1a38e305dcd783 (principal author: David Rowley; committer: Robert Haas )
** The above link contains a patch to fix this.
* Logical WAL Messages are missing database and origin filtering
** original commit: 3fe3511d05127cc024b221040db2eeb352e7d716 (pricipal author: Petr Jelinek; committer: Simon Riggs)
** fix available in the same thread
** fixed by be65ed
* commit 6150a1b0 hurts performance
** original commit: 6150a1b08a9fe7ead2b25240be46dddeae9d98e1 (principal author: Andres Freund; committer: Robert Haas )
** testing after the atomic pin/unpin patch and other recent work seems to show that we've recovered the performance
* sporadic regression tests failures in syncrep suite
** Per report from hamster here
** fixed by 36c1c91
* Odd system-column handling in postgres_fdw join pushdown patch
** original commit: (principal author: Ashutosh Bapat; committer: Robert Haas )
* 
** original commit: (principal author: Stephen Frost; committer: Stephen Frost)
** Fixed in 
* Update of backup documentation (per Brussels Developer Meeting, reorder options to focus on "safe and easy" rather than "difficult and risky")
** makes that documentation incomplete since it wasn't updated, due to the restructure being planned. If restructure not done, then at least additional notes based on this commit should be added.
** original commit: (principal author: Magnus Hagander; committer: Magnus Hagander )
* 
** original commit: 45be99f8cd5d606086e0a458c9c72910ba8a613d (principal author: Robert Haas; committer: Robert Haas)
** fixed in 
* Can't cancel DML pushdown queries
** original commit: (principal author: Etsuro Fujita; committer: Robert Haas )
** Patch available here making more queries than those DMLs interruptible by client.
** fixed in 
* 
** original commit: (principal author: Amit Kapila; committer: Robert Haas)
** fixed in 
* LWLocks API refactoring breaks extensions, there are no documented way, how to fix it.
** suggested way to fix it
** Pavel confirmed that the suggestion worked
* assorted checkpoint_flush_after issues
** fixed in 
* 
** fixed in 
* EXPLAIN VERBOSE with parallel Aggregate displays bogus output
** original commit: (principal author: David Rowley; committer: Robert Haas )
** fixed in 
* configurable writeback causes or reveals mysterious invalidation-related failures
** original commit: (principal author: Fabien Coelho; committer: Andres Freund )
** fixed in 
* add_partial_path can recycle Paths that are still referenced
** fixed in 
* 
** original commit: (principal author: Robert Haas; committer: Robert Haas)
** fixed in 
* psql's \ev and \sv missing support for view options
** These commands lack proper support for security barrier views or WITH CHECK OPTION.
** Fixed in 
* Segfault with simple query in planner, related to use of foreign keys in join estimates
** Fixed in 
* old_snapshot_threshold's interaction with hash index
** original commit: (principal author: Kevin Grittner; committer: Kevin Grittner)
** Patch to fix it
** Fixed in 
* should we revert the changes to restrict assuming a pre-created system role?
** Fixed in 
* "snapshot too old" commit causes performance regression at high concurrency, even when disabled
** original commit: (principal author: Kevin Grittner; committer: Kevin Grittner)
** hopefully resolved by commit: but testing on a big machine needed to confirm
** some testing by rhaas on a big machine suggests that it is fixed
** but some testing from Andres says maybe not
** new commit is another attempt to fix this
** benchmarks by Tomas Vondra show slight gain (within the noise) with the patch (disabled) versus reverted
* ALTER TABLE lock downgrades have broken pg_upgrade
** Fixed in 
* GIN data corruption bug(s) in 9.6devel
** original commit: (principal author: Jeff Janes; committer: Teodor Sigaev )
** A pre-existing theoretical bug, which becomes quite reachable in 9.6 due to FSM changes in commit 
** fixed for 9.6 in ; back-branch fixes pending
== Older Bugs ==
* attempted to delete invisible tuple and unexpected chunk number in crash recovery stress test
** Symptoms suggest a data corruption bug.
** Test procedure, Bisection (not reproducible)
** original suspected commit: (principal author: Alexander Korotkov; committer: Andres Freund)
** now appears to be a longstanding issue 
* Suspicious behaviour on applying XLOG_HEAP2_VISIBLE (9.2 and later)
** fixes this, sorta by accident, in master only
* Truncation of new relfilenodes broken with wal_level = minimal (9.4 and later)
* OOM in libpq and infinite loop with getCopyStart() (9.1 and later)
** Patch available using some emergency message structure. Need review, and surely more discussion
* Logic to skip checkpoint is broken (9.1~9.5 if wal_level >= hot_standby, 9.6 if wal_level >= replica)
** Patch available for review, preferred approach with XLogInsertExtended() (Michael, Robert, Simon at least)
* pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled
** Patch available for review.
* Deadlock issue with pg_restore in WIN32 with urgent exit code path
** Patch available for review
* pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data
** Patch available for review
* pg_receivexlog missing fsync calls of data directory
** Patch available for review
* pg_basebackup and pg_dump should fsync dumped data and make it persistent.
== Non-bugs ==
* Speedup 2-phase commit on slaves (reason for non-bug status)
** Replication lag
** original commit: 78b2f65aa1262eb4ecbf8b3785cb1b9cf4db78e (principal author: Stas Kelvich; committer: Simon Riggs) (speedup on master node)
** current patch: Link
** Failure at replay because of locks taken at PREPARE phase
** Too late to be considered for 9.6.
* 
** Need to update extensions with parallel-safety markings
** This an opportunity for further optimization, not a defect.
* does GIN's accumulatedMemory counter need to be signed?
** original commit: (principal author: Robert Abraham; owner: Teodor Sigaev )
** No; no subtraction will make it wrap. One could add an assertion about that.
* add max_parallel_workers GUC
** this would be a system-wide limit, to keep parallel workers from consuming more of max_worker_processes than desired
** there's support for slipping this into 9.6, but rhaas may not have time, and it's not a stop-ship issue
Category:PostgreSQL_9.6
Category:Open_Items