pgsql: Allow incremental sorts for windowing functions

2020-09-15 Thread David Rowley
Allow incremental sorts for windowing functions This expands on the work done in d2d8a229b and allows incremental sort to be considered during create_window_paths(). Author: David Rowley Reviewed-by: Daniel Gustafsson, Tomas Vondra Discussion: https://postgr.es/m/CAApHDvoOHobiA2x13NtWnWLcTXYj9dd

pgsql: Doc: fix misstatement in v13 release notes.

2020-09-15 Thread Tom Lane
Doc: fix misstatement in v13 release notes. Parallel vacuuming isn't restricted to b-tree indexes. Noted by Peter Eisentraut. Discussion: https://postgr.es/m/f1c43223-3987-a23f-2063-18fd0aa4f...@2ndquadrant.com Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdif

pgsql: Doc: improve release notes' info about FROM UNPACKAGED feature r

2020-09-15 Thread Tom Lane
Doc: improve release notes' info about FROM UNPACKAGED feature removal. Per gripe from Jonathan Katz. Discussion: https://postgr.es/m/e0a4d177-d003-8ebb-5296-5a445472b...@postgresql.org Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d42c6176446440b185fcb95

pgsql: Tag refs/tags/REL_13_RC1 was created

2020-09-15 Thread noreply
Tag refs/tags/REL_13_RC1 was created.

pgsql: Report resource usage at the end of recovery

2020-09-15 Thread David Rowley
Report resource usage at the end of recovery Reporting this has been rather useful in some recent recovery speedup work. It also seems like something that will be useful to the average DBA too. Author: David Rowley Reviewed-by: Thomas Munro Discussion: https://postgr.es/m/CAApHDvqYVORiZxq2xPvP6

pgsql: Fix use-after-free bug with event triggers in an extension scrip

2020-09-15 Thread Alvaro Herrera
Fix use-after-free bug with event triggers in an extension script ALTER TABLE commands in an extension script are added to an event trigger command list; but starting with commit b5810de3f4 they do so in a memory context that's too short-lived, so when execution ends and time comes to use the entr

pgsql: Fix use-after-free bug with event triggers in an extension scrip

2020-09-15 Thread Alvaro Herrera
Fix use-after-free bug with event triggers in an extension script ALTER TABLE commands in an extension script are added to an event trigger command list; but starting with commit b5810de3f4 they do so in a memory context that's too short-lived, so when execution ends and time comes to use the entr

pgsql: Optimize compactify_tuples function

2020-09-15 Thread David Rowley
Optimize compactify_tuples function This function could often be seen in profiles of vacuum and could often be a significant bottleneck during recovery. The problem was that a qsort was performed in order to sort an array of item pointers in reverse offset order so that we could use that to safely

pgsql: Fix initialization of RelationSyncEntry for streaming transactio

2020-09-15 Thread Amit Kapila
Fix initialization of RelationSyncEntry for streaming transactions. In commit 464824323e, for each RelationSyncEntry we maintained the list of xids (streamed_txns) for which we have already sent the schema. This helps us to track when to send the schema to the downstream node for replication of st

pgsql: HashAgg: release write buffers sooner by rewinding tape.

2020-09-15 Thread Jeff Davis
HashAgg: release write buffers sooner by rewinding tape. This was an oversight. The purpose of 7fdd919ae7 was to avoid keeping tape buffers around unnecessisarily, but HashAgg didn't rewind early enough. Reviewed-by: Peter Geoghegan Discussion: https://postgr.es/m/1fb1151c2cddf8747d14e0532da283c

pgsql: HashAgg: release write buffers sooner by rewinding tape.

2020-09-15 Thread Jeff Davis
HashAgg: release write buffers sooner by rewinding tape. This was an oversight. The purpose of 7fdd919ae7 was to avoid keeping tape buffers around unnecessisarily, but HashAgg didn't rewind early enough. Reviewed-by: Peter Geoghegan Discussion: https://postgr.es/m/1fb1151c2cddf8747d14e0532da283c

pgsql: Change LogicalTapeSetBlocks() to use nBlocksWritten.

2020-09-15 Thread Jeff Davis
Change LogicalTapeSetBlocks() to use nBlocksWritten. Previously, it was based on nBlocksAllocated to account for tapes with open write buffers that may not have made it to the BufFile yet. That was unnecessary, because callers do not need to get the number of blocks while a tape has an open write

pgsql: Change LogicalTapeSetBlocks() to use nBlocksWritten.

2020-09-15 Thread Jeff Davis
Change LogicalTapeSetBlocks() to use nBlocksWritten. Previously, it was based on nBlocksAllocated to account for tapes with open write buffers that may not have made it to the BufFile yet. That was unnecessary, because callers do not need to get the number of blocks while a tape has an open write