Re: pgsql: pgbench: add --partitions and --partition-method options.

2019-10-03 Thread Amit Kapila
On Thu, Oct 3, 2019 at 8:33 AM Amit Kapila wrote: > pgbench: add --partitions and --partition-method options. > > After this commit, I noticed fairywren is failing [1] with below symptoms: pg_regress/strings LOG: statement: SELECT CAST(f1 AS char(10)) AS "char(text)" FROM TEXT_TBL; 2019-10-03 05

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

pgsql: Selectively include window frames in expression walks/mutates.

2019-10-03 Thread Andrew Gierth
Selectively include window frames in expression walks/mutates. query_tree_walker and query_tree_mutator were skipping the windowClause of the query, without regard for the fact that the startOffset and endOffset in a WindowClause node are expression trees that need to be processed. This was an ove

Re: pgsql: Implement jsonpath .datetime() method

2019-10-03 Thread Robert Haas
On Tue, Oct 1, 2019 at 1:41 PM Alexander Korotkov wrote: > So, basically standard requires us to suppress any error happening in > filter expression. Sounds like the standard is dumb, then. :-) > But as I wrote before suppression of errors in > datetime comparison may lead to surprising results.

pgsql: Allow repalloc() to give back space when a large chunk is downsi

2019-10-03 Thread Tom Lane
Allow repalloc() to give back space when a large chunk is downsized. Up to now, if you resized a large (>8K) palloc chunk down to a smaller size, aset.c made no attempt to return any space to the malloc pool. That's unpleasant if a really large allocation is resized to a significantly smaller size

pgsql: Allow repalloc() to give back space when a large chunk is downsi

2019-10-03 Thread Tom Lane
Allow repalloc() to give back space when a large chunk is downsized. Up to now, if you resized a large (>8K) palloc chunk down to a smaller size, aset.c made no attempt to return any space to the malloc pool. That's unpleasant if a really large allocation is resized to a significantly smaller size

pgsql: Allow repalloc() to give back space when a large chunk is downsi

2019-10-03 Thread Tom Lane
Allow repalloc() to give back space when a large chunk is downsized. Up to now, if you resized a large (>8K) palloc chunk down to a smaller size, aset.c made no attempt to return any space to the malloc pool. That's unpleasant if a really large allocation is resized to a significantly smaller size

pgsql: Allow repalloc() to give back space when a large chunk is downsi

2019-10-03 Thread Tom Lane
Allow repalloc() to give back space when a large chunk is downsized. Up to now, if you resized a large (>8K) palloc chunk down to a smaller size, aset.c made no attempt to return any space to the malloc pool. That's unpleasant if a really large allocation is resized to a significantly smaller size

pgsql: Allow repalloc() to give back space when a large chunk is downsi

2019-10-03 Thread Tom Lane
Allow repalloc() to give back space when a large chunk is downsized. Up to now, if you resized a large (>8K) palloc chunk down to a smaller size, aset.c made no attempt to return any space to the malloc pool. That's unpleasant if a really large allocation is resized to a significantly smaller size

pgsql: Allow repalloc() to give back space when a large chunk is downsi

2019-10-03 Thread Tom Lane
Allow repalloc() to give back space when a large chunk is downsized. Up to now, if you resized a large (>8K) palloc chunk down to a smaller size, aset.c made no attempt to return any space to the malloc pool. That's unpleasant if a really large allocation is resized to a significantly smaller size

pgsql: Allow repalloc() to give back space when a large chunk is downsi

2019-10-03 Thread Tom Lane
Allow repalloc() to give back space when a large chunk is downsized. Up to now, if you resized a large (>8K) palloc chunk down to a smaller size, aset.c made no attempt to return any space to the malloc pool. That's unpleasant if a really large allocation is resized to a significantly smaller size

pgsql: Avoid unnecessary out-of-memory errors during encoding conversio

2019-10-03 Thread Tom Lane
Avoid unnecessary out-of-memory errors during encoding conversion. Encoding conversion uses the very simplistic rule that the output can't be more than 4X longer than the input, and palloc's a buffer of that size. This results in failure to convert any string longer than 1/4 GB, which is becoming

pgsql: Avoid unnecessary out-of-memory errors during encoding conversio

2019-10-03 Thread Tom Lane
Avoid unnecessary out-of-memory errors during encoding conversion. Encoding conversion uses the very simplistic rule that the output can't be more than 4X longer than the input, and palloc's a buffer of that size. This results in failure to convert any string longer than 1/4 GB, which is becoming

pgsql: Avoid unnecessary out-of-memory errors during encoding conversio

2019-10-03 Thread Tom Lane
Avoid unnecessary out-of-memory errors during encoding conversion. Encoding conversion uses the very simplistic rule that the output can't be more than 4X longer than the input, and palloc's a buffer of that size. This results in failure to convert any string longer than 1/4 GB, which is becoming

pgsql: Avoid unnecessary out-of-memory errors during encoding conversio

2019-10-03 Thread Tom Lane
Avoid unnecessary out-of-memory errors during encoding conversion. Encoding conversion uses the very simplistic rule that the output can't be more than 4X longer than the input, and palloc's a buffer of that size. This results in failure to convert any string longer than 1/4 GB, which is becoming

pgsql: Avoid unnecessary out-of-memory errors during encoding conversio

2019-10-03 Thread Tom Lane
Avoid unnecessary out-of-memory errors during encoding conversion. Encoding conversion uses the very simplistic rule that the output can't be more than 4X longer than the input, and palloc's a buffer of that size. This results in failure to convert any string longer than 1/4 GB, which is becoming

pgsql: Avoid unnecessary out-of-memory errors during encoding conversio

2019-10-03 Thread Tom Lane
Avoid unnecessary out-of-memory errors during encoding conversion. Encoding conversion uses the very simplistic rule that the output can't be more than 4X longer than the input, and palloc's a buffer of that size. This results in failure to convert any string longer than 1/4 GB, which is becoming

pgsql: Avoid unnecessary out-of-memory errors during encoding conversio

2019-10-03 Thread Tom Lane
Avoid unnecessary out-of-memory errors during encoding conversion. Encoding conversion uses the very simplistic rule that the output can't be more than 4X longer than the input, and palloc's a buffer of that size. This results in failure to convert any string longer than 1/4 GB, which is becoming

pgsql: Fix --dry-run mode of pg_rewind

2019-10-03 Thread Michael Paquier
Fix --dry-run mode of pg_rewind Even if --dry-run mode was specified, the control file was getting updated, preventing follow-up runs of pg_rewind to work properly on the target data folder. The origin of the problem came from the refactoring done by ce6afc6. Author: Alexey Kondratov Discussion:

pgsql: Fix --dry-run mode of pg_rewind

2019-10-03 Thread Michael Paquier
Fix --dry-run mode of pg_rewind Even if --dry-run mode was specified, the control file was getting updated, preventing follow-up runs of pg_rewind to work properly on the target data folder. The origin of the problem came from the refactoring done by ce6afc6. Author: Alexey Kondratov Discussion:

Re: pgsql: pgbench: add --partitions and --partition-method options.

2019-10-03 Thread Amit Kapila
On Thu, Oct 3, 2019 at 3:08 PM Amit Kapila wrote: > On Thu, Oct 3, 2019 at 8:33 AM Amit Kapila wrote: > >> pgbench: add --partitions and --partition-method options. >> >> > After this commit, I noticed fairywren is failing [1] with below symptoms: > > pg_regress/strings LOG: statement: SELECT CA