public inbox for [email protected]help / color / mirror / Atom feed
[PATCH 2/6] 0001 review 25+ messages / 4 participants [nested] [flat]
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* [PATCH 2/6] 0001 review @ 2021-02-15 15:26 Tomas Vondra <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Tomas Vondra @ 2021-02-15 15:26 UTC (permalink / raw) --- doc/src/sgml/monitoring.sgml | 2 +- src/backend/commands/copyfrom.c | 1 + src/backend/commands/copyto.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3c39c82f1a..c5048fefd4 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6561,7 +6561,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, <para> The io target that the data is read from or written to: <literal>FILE</literal>, <literal>PROGRAM</literal>, - <literal>STDIO</literal> (for COPY FROM STDIN and COPY TO STDOUT), + <literal>STDIO</literal> (for <command>COPY FROM STDIN</command> and <command>COPY TO STDOUT</command>), or <literal>CALLBACK</literal> (used in the table synchronization background worker). </para></entry> diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c index c3610eb67e..d98f447cf5 100644 --- a/src/backend/commands/copyfrom.c +++ b/src/backend/commands/copyfrom.c @@ -1508,6 +1508,7 @@ BeginCopyFrom(ParseState *pstate, ReceiveCopyBinaryHeader(cstate); } + /* XXX this block seems weird */ { int64 io_target; switch (cstate->copy_src) diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 42c4a828df..4b76bf5ef6 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -772,6 +772,8 @@ BeginCopyTo(ParseState *pstate, /* initialize progress */ pgstat_progress_start_command(PROGRESS_COMMAND_COPY, cstate->rel ? RelationGetRelid(cstate->rel) : InvalidOid); + + /* XXX this too */ { const int progress_index[] = { PROGRESS_COPY_COMMAND, -- 2.26.2 --------------DA8D60BF026F7ACE69A9AEE5 Content-Type: text/x-patch; charset=UTF-8; name="v7-0003-Add-backlinks-to-progress-reporting-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v7-0003-Add-backlinks-to-progress-reporting-documentation.pa"; filename*1="tch" ^ permalink raw reply [nested|flat] 25+ messages in thread
* Why is EXECUTE granted to PUBLIC for all routines? @ 2022-04-22 17:31 Jacek Trocinski <[email protected]> 0 siblings, 1 reply; 25+ messages in thread From: Jacek Trocinski @ 2022-04-22 17:31 UTC (permalink / raw) To: [email protected] Hi, The default behavior on Postgres is to grant EXECUTE to PUBLIC on any function or procedure that is created. I feel this this is a security concern, especially for procedures and functions defined with the "SECURITY DEFINER" clause. Normally, we don’t want everyone on the database to be able to run procedures or function without explicitly granting them the privilege to do so. Is there any reason to keep grant EXECUTE to PUBLIC on routines as the default? Best, Jacek Trocinski ^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: Why is EXECUTE granted to PUBLIC for all routines? @ 2022-04-22 17:44 Tom Lane <[email protected]> parent: Jacek Trocinski <[email protected]> 0 siblings, 1 reply; 25+ messages in thread From: Tom Lane @ 2022-04-22 17:44 UTC (permalink / raw) To: Jacek Trocinski <[email protected]>; +Cc: [email protected] Jacek Trocinski <[email protected]> writes: > The default behavior on Postgres is to grant EXECUTE to PUBLIC on any > function or procedure that is created. > I feel this this is a security concern, especially for procedures and > functions defined with the "SECURITY DEFINER" clause. There is zero security concern for non-SECURITY-DEFINER functions, since they do nothing callers couldn't do for themselves. For those, you typically do want to grant out permissions. As for SECURITY DEFINER functions, there is no reason to make one unless it is meant to be called by someone besides the owner. Perhaps PUBLIC isn't the scope you want to grant it to, but no-privileges wouldn't be a useful default there either. In any case, changing this decision now would cause lots of problems, such as breaking existing dump files. We're unlikely to revisit it. As noted in the docs, best practice is to adjust the permissions as you want them in the same transaction that creates the function. regards, tom lane ^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: Why is EXECUTE granted to PUBLIC for all routines? @ 2022-04-24 02:43 Isaac Morland <[email protected]> parent: Tom Lane <[email protected]> 0 siblings, 0 replies; 25+ messages in thread From: Isaac Morland @ 2022-04-24 02:43 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: Jacek Trocinski <[email protected]>; PostgreSQL Developers <[email protected]> On Fri, 22 Apr 2022 at 13:44, Tom Lane <[email protected]> wrote: > There is zero security concern for non-SECURITY-DEFINER functions, > since they do nothing callers couldn't do for themselves. For those, > you typically do want to grant out permissions. As for SECURITY DEFINER > functions, there is no reason to make one unless it is meant to be called > by someone besides the owner. Perhaps PUBLIC isn't the scope you want to > grant it to, but no-privileges wouldn't be a useful default there either. > No privileges would be a safe default, not entirely unlike the default "can only connect from localhost" pg_hba.conf, … > In any case, changing this decision now would cause lots of problems, > such as breaking existing dump files. We're unlikely to revisit it. > … but, yeah, this would be rather hard to change without causing more trouble. > As noted in the docs, best practice is to adjust the permissions > as you want them in the same transaction that creates the function. > I wrote a function which resets the permissions on all objects in the specified schemas to default. Then for each project I have a privileges-granting file which starts by resetting all permissions, then grants exactly the permissions I want. Most of the resetting is done by checking the existing privileges and revoking them; then it ASSERTs that this leaves an empty ACL, and finally does an UPDATE on the relevant system table to change the ACL from empty to NULL. For SECURITY DEFINER functions, the reset function then revokes PUBLIC privileges, leaving it to the specific project to grant the appropriate privileges. BTW, the reg* types are amazing for writing this kind of stuff. Makes all sorts of things so much easier. ^ permalink raw reply [nested|flat] 25+ messages in thread
end of thread, other threads:[~2022-04-24 02:43 UTC | newest] Thread overview: 25+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2021-02-15 15:26 [PATCH 2/6] 0001 review Tomas Vondra <[email protected]> 2022-04-22 17:31 Why is EXECUTE granted to PUBLIC for all routines? Jacek Trocinski <[email protected]> 2022-04-22 17:44 ` Re: Why is EXECUTE granted to PUBLIC for all routines? Tom Lane <[email protected]> 2022-04-24 02:43 ` Re: Why is EXECUTE granted to PUBLIC for all routines? Isaac Morland <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox