public inbox for [email protected]help / color / mirror / Atom feed
[PATCH v3 3/3] Fix sizing of tape read buffers. 27+ messages / 7 participants [nested] [flat]
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* [PATCH v3 3/3] Fix sizing of tape read buffers. @ 2021-01-22 20:59 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Heikki Linnakangas @ 2021-01-22 20:59 UTC (permalink / raw) --- src/backend/utils/sort/tuplesort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 14104643e78..aff2f201f52 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -2658,7 +2658,7 @@ merge_read_buffer_size(int64 avail_mem, int nInputTapes, int nInputRuns, * we derive the input buffer size from the amount of memory available, * and M and N. */ - return (avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes; + return Max((avail_mem - TAPE_BUFFER_OVERHEAD * nOutputTapes) / nInputTapes, 0); } /* -- 2.29.2 --------------631E0A48DCAEA386819DFCEC-- ^ permalink raw reply [nested|flat] 27+ messages in thread
* Re: How about a psql backslash command to show GUCs? @ 2022-04-06 17:58 Alvaro Herrera <[email protected]> 0 siblings, 1 reply; 27+ messages in thread From: Alvaro Herrera @ 2022-04-06 17:58 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: [email protected]; Mark Dilger <[email protected]> On 2022-Apr-06, Tom Lane wrote: > However, I very often find myself resorting to the much more tedious > > select * from pg_settings where name like '%foo%'; > > when I want to see some related parameters, or when I'm a bit > fuzzy on the exact name of the parameter. Been there many times, so +1 for the general idea. > In the discussion about adding privileges for GUCs [1], there > was a proposal to add a new psql backslash command to show GUCs, > which could reduce this problem to something like > > \dcp *foo* +1. As for command name, I like \show as proposed by Pavel. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ ^ permalink raw reply [nested|flat] 27+ messages in thread
* Re: How about a psql backslash command to show GUCs? @ 2022-04-06 18:26 Joe Conway <[email protected]> parent: Alvaro Herrera <[email protected]> 0 siblings, 1 reply; 27+ messages in thread From: Joe Conway @ 2022-04-06 18:26 UTC (permalink / raw) To: Alvaro Herrera <[email protected]>; Tom Lane <[email protected]>; +Cc: [email protected]; Mark Dilger <[email protected]> On 4/6/22 13:58, Alvaro Herrera wrote: > On 2022-Apr-06, Tom Lane wrote: > >> However, I very often find myself resorting to the much more tedious >> >> select * from pg_settings where name like '%foo%'; >> >> when I want to see some related parameters, or when I'm a bit >> fuzzy on the exact name of the parameter. > > Been there many times, so +1 for the general idea. > >> In the discussion about adding privileges for GUCs [1], there >> was a proposal to add a new psql backslash command to show GUCs, >> which could reduce this problem to something like >> >> \dcp *foo* > > +1. As for command name, I like \show as proposed by Pavel. +1 I'd love something for the same reasons. No as sure about \show though. That seems like it could be confused with showing other stuff. Maybe consistent with \sf[+] and \sv[+] we could add \sc[+]? Joe ^ permalink raw reply [nested|flat] 27+ messages in thread
* Re: How about a psql backslash command to show GUCs? @ 2022-04-06 18:40 Tom Lane <[email protected]> parent: Joe Conway <[email protected]> 0 siblings, 2 replies; 27+ messages in thread From: Tom Lane @ 2022-04-06 18:40 UTC (permalink / raw) To: Joe Conway <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; [email protected]; Mark Dilger <[email protected]> Joe Conway <[email protected]> writes: > No as sure about \show though. That seems like it could be confused with > showing other stuff. Maybe consistent with \sf[+] and \sv[+] we could > add \sc[+]? Hmm ... my first reaction to that was "no, it should be \sp for 'parameter'". But with the neighboring \sf for 'function', it'd be easy to think that maybe 'p' means 'procedure'. I do agree that \show might be a bad choice, the reason being that the adjacent \set command is for psql variables not GUCs; if we had a \show I'd sort of expect it to be a variant spelling of "\echo :variable". "\sc" isn't awful perhaps. Ah, naming ... the hardest problem in computer science. regards, tom lane ^ permalink raw reply [nested|flat] 27+ messages in thread
* Re: How about a psql backslash command to show GUCs? @ 2022-04-06 21:34 Jonathan S. Katz <[email protected]> parent: Tom Lane <[email protected]> 1 sibling, 1 reply; 27+ messages in thread From: Jonathan S. Katz @ 2022-04-06 21:34 UTC (permalink / raw) To: Tom Lane <[email protected]>; Joe Conway <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; [email protected]; Mark Dilger <[email protected]> On 4/6/22 2:40 PM, Tom Lane wrote: > Joe Conway <[email protected]> writes: >> No as sure about \show though. That seems like it could be confused with >> showing other stuff. Maybe consistent with \sf[+] and \sv[+] we could >> add \sc[+]? > > Hmm ... my first reaction to that was "no, it should be \sp for > 'parameter'". But with the neighboring \sf for 'function', it'd > be easy to think that maybe 'p' means 'procedure'. > > I do agree that \show might be a bad choice, the reason being that > the adjacent \set command is for psql variables not GUCs; if we > had a \show I'd sort of expect it to be a variant spelling of > "\echo :variable". > > "\sc" isn't awful perhaps. > > Ah, naming ... the hardest problem in computer science. (but the easiest thing to have an opinion on ;) +1 on the feature proposal. I am a bit torn between "\dcp" (or \dsetting / \dconfig? we don't necessarily need for it to be super short) and "\sc". Certainly with pattern matching the interface for the "\d" commands would fit that pattern. "\sc" would make sense for a thorough introspection of what is in the GUC. That said, we get that with SHOW today. So I'm leaning towards something in the "\d" family. Thanks, Jonathan Attachments: [application/pgp-signature] OpenPGP_signature (840B, ../../[email protected]/2-OpenPGP_signature) download ^ permalink raw reply [nested|flat] 27+ messages in thread
* Re: How about a psql backslash command to show GUCs? @ 2022-04-06 22:36 Mark Dilger <[email protected]> parent: Jonathan S. Katz <[email protected]> 0 siblings, 0 replies; 27+ messages in thread From: Mark Dilger @ 2022-04-06 22:36 UTC (permalink / raw) To: Jonathan S. Katz <[email protected]>; +Cc: Tom Lane <[email protected]>; Joe Conway <[email protected]>; Alvaro Herrera <[email protected]>; [email protected] > On Apr 6, 2022, at 2:34 PM, Jonathan S. Katz <[email protected]> wrote: > > "\sc" would make sense I originally wrote the command as \dcp (describe configuration parameter) because \dp (describe parameter) wasn't available. The thing we're showing is a "parameter", not a "config". If we're going to use a single letter, I'd prefer /p/. — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company ^ permalink raw reply [nested|flat] 27+ messages in thread
* Re: How about a psql backslash command to show GUCs? @ 2022-04-07 03:25 David Rowley <[email protected]> parent: Tom Lane <[email protected]> 1 sibling, 0 replies; 27+ messages in thread From: David Rowley @ 2022-04-07 03:25 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: Joe Conway <[email protected]>; Alvaro Herrera <[email protected]>; PostgreSQL Developers <[email protected]>; Mark Dilger <[email protected]> I also find myself querying pg_settings all too often. More typing than I'd like. On Thu, 7 Apr 2022 at 06:40, Tom Lane <[email protected]> wrote: > I do agree that \show might be a bad choice, the reason being that > the adjacent \set command is for psql variables not GUCs; if we > had a \show I'd sort of expect it to be a variant spelling of > "\echo :variable". I also think \show is not a great choice. I'd rather see us follow the \d pattern for showing information about objects in the database. > "\sc" isn't awful perhaps. I think \dG is pretty good. G for GUC. David ^ permalink raw reply [nested|flat] 27+ messages in thread
end of thread, other threads:[~2022-04-07 03:25 UTC | newest] Thread overview: 27+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2021-01-22 20:59 [PATCH v3 3/3] Fix sizing of tape read buffers. Heikki Linnakangas <[email protected]> 2022-04-06 17:58 Re: How about a psql backslash command to show GUCs? Alvaro Herrera <[email protected]> 2022-04-06 18:26 ` Re: How about a psql backslash command to show GUCs? Joe Conway <[email protected]> 2022-04-06 18:40 ` Re: How about a psql backslash command to show GUCs? Tom Lane <[email protected]> 2022-04-06 21:34 ` Re: How about a psql backslash command to show GUCs? Jonathan S. Katz <[email protected]> 2022-04-06 22:36 ` Re: How about a psql backslash command to show GUCs? Mark Dilger <[email protected]> 2022-04-07 03:25 ` Re: How about a psql backslash command to show GUCs? David Rowley <[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