[COMMITTERS] pgsql: Correct logical decoding restore behaviour for subtransactions.

2016-10-03 Thread Andres Freund
Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd

[COMMITTERS] pgsql: Correct logical decoding restore behaviour for subtransactions.

2016-10-03 Thread Andres Freund
Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd

[COMMITTERS] pgsql: Correct logical decoding restore behaviour for subtransactions.

2016-10-03 Thread Andres Freund
Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd

[COMMITTERS] pgsql: Correct logical decoding restore behaviour for subtransactions.

2016-10-03 Thread Andres Freund
Correct logical decoding restore behaviour for subtransactions. Before initializing iteration over a subtransaction's changes, the last few changes were not spilled to disk. That's correct if the transaction didn't spill to disk, but otherwise... This bug can lead to missed or misorderd

[COMMITTERS] pgsql: Convert contrib/hstore_plpython to not use direct linking to oth

2016-10-03 Thread Tom Lane
Convert contrib/hstore_plpython to not use direct linking to other modules. Previously, on most platforms, we allowed hstore_plpython's references to hstore and plpython to be unresolved symbols at link time, trusting the dynamic linker to resolve them when the module is loaded. This has a

[COMMITTERS] pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var

2016-10-03 Thread Tom Lane
Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables. Commit 88e982302 invented GUC_UNIT_XSEGS for min_wal_size and max_wal_size, but neglected to make it display sensibly in pg_settings.unit (by adding a case to the switch in GetConfigOptionByNum). Fix that, and adjust said

[COMMITTERS] pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var

2016-10-03 Thread Tom Lane
Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables. Commit 88e982302 invented GUC_UNIT_XSEGS for min_wal_size and max_wal_size, but neglected to make it display sensibly in pg_settings.unit (by adding a case to the switch in GetConfigOptionByNum). Fix that, and adjust said

[COMMITTERS] pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var

2016-10-03 Thread Tom Lane
Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables. Commit 88e982302 invented GUC_UNIT_XSEGS for min_wal_size and max_wal_size, but neglected to make it display sensibly in pg_settings.unit (by adding a case to the switch in GetConfigOptionByNum). Fix that, and adjust said

[COMMITTERS] pgsql: Fix RLS with COPY (col1, col2) FROM tab

2016-10-03 Thread Stephen Frost
Fix RLS with COPY (col1, col2) FROM tab Attempting to COPY a subset of columns from a table with RLS enabled would fail due to an invalid query being constructed (using a single ColumnRef with the list of fields to exact in 'fields', but that's for the different levels of an indirection for a

[COMMITTERS] pgsql: Fix RLS with COPY (col1, col2) FROM tab

2016-10-03 Thread Stephen Frost
Fix RLS with COPY (col1, col2) FROM tab Attempting to COPY a subset of columns from a table with RLS enabled would fail due to an invalid query being constructed (using a single ColumnRef with the list of fields to exact in 'fields', but that's for the different levels of an indirection for a

[COMMITTERS] pgsql: Fix RLS with COPY (col1, col2) FROM tab

2016-10-03 Thread Stephen Frost
Fix RLS with COPY (col1, col2) FROM tab Attempting to COPY a subset of columns from a table with RLS enabled would fail due to an invalid query being constructed (using a single ColumnRef with the list of fields to exact in 'fields', but that's for the different levels of an indirection for a

[COMMITTERS] pgsql: Enforce a specific order for probing library loadability in pg_u

2016-10-03 Thread Tom Lane
Enforce a specific order for probing library loadability in pg_upgrade. pg_upgrade checks whether all the shared libraries used in the old cluster are also available in the new one by issuing LOAD for each library name. Previously, it cared not what order it did the LOADs in. Ideally it should

[COMMITTERS] pgsql: Enforce a specific order for probing library loadability in pg_u

2016-10-03 Thread Tom Lane
Enforce a specific order for probing library loadability in pg_upgrade. pg_upgrade checks whether all the shared libraries used in the old cluster are also available in the new one by issuing LOAD for each library name. Previously, it cared not what order it did the LOADs in. Ideally it should

[COMMITTERS] pgsql: Change the way pre-reading in external sort's merge phase works.

2016-10-03 Thread Heikki Linnakangas
Change the way pre-reading in external sort's merge phase works. Don't pre-read tuples into SortTuple slots during merge. Instead, use the memory for larger read buffers in logtape.c. We're doing the same number of READTUP() calls either way, but managing the pre-read SortTuple slots is much more