pgsql: Add default roles for file/program access

2018-04-06 Thread Stephen Frost
Add default roles for file/program access This patch adds new default roles named 'pg_read_server_files', 'pg_write_server_files', 'pg_execute_server_program' which allow an administrator to GRANT to a non-superuser role the ability to access server-side files or run programs through PostgreSQL

pgsql: Support new default roles with adminpack

2018-04-06 Thread Stephen Frost
Support new default roles with adminpack This provides a newer version of adminpack which works with the newly added default roles to support GRANT'ing to non-superusers access to read and write files, along with related functions (unlinking files, getting file length, renaming/removing files,

pgsql: Fix typo

2018-04-06 Thread Magnus Hagander
Fix typo Author: Michael Banck Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f66c37b2f7b99d1216da9b6267793cfbdc2e58c4 Modified Files -- src/bin/pg_basebackup/t/010_pg_basebackup.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix badly edited doc sentence

2018-04-06 Thread Alvaro Herrera
Fix badly edited doc sentence Noted by Vik Fearing and Robert Haas Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3cabe3863015efc72d513d3aa3b47d03eed96f49 Modified Files -- doc/src/sgml/ref/create_table.sgml | 5 ++--- 1 file changed, 2 insertions(+),

pgsql: Remove some unnecessary quote marks from catalog DATA lines.

2018-04-06 Thread Tom Lane
Remove some unnecessary quote marks from catalog DATA lines. This has no functional impact whatsoever. However, it causes these unnecessary quote marks to disappear from the generated postgres.bki file, making it easier to verify that the upcoming bootstrap data conversion patch doesn't change

pgsql: Allow insert and update tuple routing and COPY for foreign table

2018-04-06 Thread Robert Haas
Allow insert and update tuple routing and COPY for foreign tables. Also enable this for postgres_fdw. Etsuro Fujita, based on an earlier patch by Amit Langote. The larger patch series of which this is a part has been reviewed by Amit Langote, David Fetter, Maksim Milyutin, Álvaro Herrera,

pgsql: Doc: fix broken markup.

2018-04-06 Thread Tom Lane
Doc: fix broken markup. Commit 3d956d956 was apparently not checked against HEAD's doc toolchain. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/eb2a0e00b18aedabd76f5442e38f4bf5d1b94974 Modified Files -- doc/src/sgml/ddl.sgml | 2 +- 1

pgsql: Fix possible failure in parallel index build.

2018-04-06 Thread Robert Haas
Fix possible failure in parallel index build. Report and proposed fix by David Rowley, put in patch form by Peter Geoghegan. Discussion: http://postgr.es/m/CAKJS1f91kq1wfYR8rnRRfKtxyhU2woEA+=whd640uxmyu+o...@mail.gmail.com Branch -- master Details ---

pgsql: Blindly attempt to fix sepgsql tests broken due to 9fdb675fc5.

2018-04-06 Thread Andres Freund
Blindly attempt to fix sepgsql tests broken due to 9fdb675fc5. The failure appears to solely be caused by the changed partition pruning logic. Author: Andres Freund Discussion: https://postgr.es/m/20180406210330.wmqw42wqgiick...@alap3.anarazel.de Branch -- master Details ---

pgsql: Fix and improve pg_atomic_flag fallback implementation.

2018-04-06 Thread Andres Freund
Fix and improve pg_atomic_flag fallback implementation. The atomics fallback implementation for pg_atomic_flag was broken, returning the inverted value from pg_atomic_test_set_flag(). This was unnoticed because a) atomic flags were unused until recently b) the test code wasn't run when the

pgsql: Fix and improve pg_atomic_flag fallback implementation.

2018-04-06 Thread Andres Freund
Fix and improve pg_atomic_flag fallback implementation. The atomics fallback implementation for pg_atomic_flag was broken, returning the inverted value from pg_atomic_test_set_flag(). This was unnoticed because a) atomic flags were unused until recently b) the test code wasn't run when the

pgsql: Fix and improve pg_atomic_flag fallback implementation.

2018-04-06 Thread Andres Freund
Fix and improve pg_atomic_flag fallback implementation. The atomics fallback implementation for pg_atomic_flag was broken, returning the inverted value from pg_atomic_test_set_flag(). This was unnoticed because a) atomic flags were unused until recently b) the test code wasn't run when the

pgsql: Fix compiler warning about format truncation

2018-04-06 Thread Peter Eisentraut
Fix compiler warning about format truncation Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2cd6520e78fe8bbb4ba38f6c7624c002aa8cc481 Modified Files -- src/bin/pg_verify_checksums/pg_verify_checksums.c | 6 +++--- 1 file changed, 3 insertions(+), 3

pgsql: Improve messaging during logical replication worker startup

2018-04-06 Thread Peter Eisentraut
Improve messaging during logical replication worker startup In case the subscription is removed before the worker is fully started, give a specific error message instead of the generic "cache lookup" error. Author: Petr Jelinek Reviewed-by: Masahiko Sawada

Re: pgsql: Allow on-line enabling and disabling of data checksums

2018-04-06 Thread Andrew Dunstan
On Fri, Apr 6, 2018 at 7:07 PM, Magnus Hagander wrote: > > > On Fri, Apr 6, 2018 at 2:03 AM, Andrew Dunstan > wrote: >> >> On Fri, Apr 6, 2018 at 5:35 AM, Magnus Hagander >> wrote: >> > Allow on-line enabling and

Re: pgsql: Allow on-line enabling and disabling of data checksums

2018-04-06 Thread Magnus Hagander
On Fri, Apr 6, 2018 at 12:41 PM, Andrew Dunstan wrote: > On Fri, Apr 6, 2018 at 7:07 PM, Magnus Hagander > wrote: > > > > > > On Fri, Apr 6, 2018 at 2:03 AM, Andrew Dunstan > > wrote: > >> > >> On Fri, Apr 6,

Re: pgsql: Allow on-line enabling and disabling of data checksums

2018-04-06 Thread Magnus Hagander
On Fri, Apr 6, 2018 at 2:03 AM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > On Fri, Apr 6, 2018 at 5:35 AM, Magnus Hagander > wrote: > > Allow on-line enabling and disabling of data checksums > > > > This makes it possible to turn checksums on in a live

pgsql: Improve parse representation for MERGE

2018-04-06 Thread Simon Riggs
Improve parse representation for MERGE Separation of parser data structures from executor, as requested by Tom Lane. Further improvements possible. While there, implement error for multiple VALUES clauses via parser to allow line number of error, as requested by Andres Freund. Author: Pavan

pgsql: Split the SetSubscriptionRelState function into two

2018-04-06 Thread Peter Eisentraut
Split the SetSubscriptionRelState function into two We don't actually need the insert-or-update logic, so it's clearer to have separate functions for the inserting and updating. Author: Petr Jelinek Reviewed-by: Masahiko Sawada Branch

pgsql: Refactor PgFdwModifyState creation/destruction into separate fun

2018-04-06 Thread Robert Haas
Refactor PgFdwModifyState creation/destruction into separate functions. Etsuro Fujita. The larger patch series of which this is a part has been reviewed by Amit Langote, David Fetter, Maksim Milyutin, Álvaro Herrera, Stephen Frost, and me. Discussion:

pgsql: Add memory context identifier to portal context

2018-04-06 Thread Peter Eisentraut
Add memory context identifier to portal context Discussion: https://www.postgresql.org/message-id/6421.1522194...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/94c1f9ba11d1241a2b3b2be7177604b26b08bc3d Modified Files --

pgsql: Rename MemoryContextCopySetIdentifier() for clarity

2018-04-06 Thread Peter Eisentraut
Rename MemoryContextCopySetIdentifier() for clarity MemoryContextCopySetIdentifier -> MemoryContextCopyAndSetIdentifier Discussion: https://www.postgresql.org/message-id/6421.1522194...@sss.pgh.pa.us Branch -- master Details ---

pgsql: Enforce child constraints during COPY TO a partitioned table.

2018-04-06 Thread Robert Haas
Enforce child constraints during COPY TO a partitioned table. The previous coding inadvertently checked the constraints for the partitioned table rather than the target partition, which could lead to data in a partition that fails to satisfy some constraint on that partition. This problem seems

pgsql: Enforce child constraints during COPY TO a partitioned table.

2018-04-06 Thread Robert Haas
Enforce child constraints during COPY TO a partitioned table. The previous coding inadvertently checked the constraints for the partitioned table rather than the target partition, which could lead to data in a partition that fails to satisfy some constraint on that partition. This problem seems