pgsql: Allow invisible PROMPT2 in psql.

2019-11-18 Thread Thomas Munro
Allow invisible PROMPT2 in psql. Keep track of the visible width of PROMPT1, and provide %w as a way for PROMPT2 to generate the same number of spaces. Author: Thomas Munro, with ideas from others Reviewed-by: Tom Lane (earlier version) Discussion: https://postgr.es/m/CA%2BhUKG%2BzGd7RigjWbxwhzG

pgsql: Add logical_decoding_work_mem to limit ReorderBuffer memory usag

2019-11-18 Thread Amit Kapila
Add logical_decoding_work_mem to limit ReorderBuffer memory usage. Instead of deciding to serialize a transaction merely based on the number of changes in that xact (toplevel or subxact), this makes the decisions based on amount of memory consumed by the changes. The memory limit is defined by a

Re: pgsql: Add tests for tuplesort.c.

2019-11-18 Thread Andres Freund
On 2019-11-16 10:40:17 -0800, Peter Geoghegan wrote: > On Sat, Nov 16, 2019 at 10:14 AM Andres Freund wrote: > > Indeed, thanks for catching. I'm off till Monday... If you want to push the > > addition... > > No problem. I'll push a fix now. Thanks!

pgsql: nbtree: Tweak _bt_pgaddtup() comments.

2019-11-18 Thread Peter Geoghegan
nbtree: Tweak _bt_pgaddtup() comments. Make it clear that _bt_pgaddtup() truncates the first data item on an internal page because its key is supposed to be treated as minus infinity within _bt_compare(). Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2110f716965fe