- 10 8月, 2018 4 次提交
-
-
由 Joao Pereira 提交于
Changed only the files regress_gp
-
由 Heikki Linnakangas 提交于
If GPOS_ASSERT() evaluates to a no-op, the 'pmdagg' variable was unused, and generated a compiler warning.
-
由 Heikki Linnakangas 提交于
Commit unsued 030ec314 commented out the function with #if 0, do the same for its prototype.
-
由 Jacob Champion 提交于
Remove the the unused pre-7.3 priority table; it has been out of sync for a while now and we don't want to accidentally make use of it in the future. It'll disappear in the 10.x merge with upstream. Co-authored-by: NNadeem Ghani <nghani@pivotal.io> Co-authored-by: NJim Doty <jdoty@pivotal.io>
-
- 09 8月, 2018 5 次提交
-
-
由 Heikki Linnakangas 提交于
-
由 Daniel Gustafsson 提交于
This was caused by a misplaced parenthesis which caused the check to always return false.
-
由 Daniel Gustafsson 提交于
If we don't find any AO tables we exit early, but we failed to close the PQExpBuffer we had for the query. Fix by destroying the buffer explicitly. Move the freeing of numeric_rels to be unconditionally since pg_free can cope with a NULL pointer. Save the quote_identifier() returned strings in a char * rather than passing them to fprint() so we can pg_free() them on the way out.
-
由 Daniel Gustafsson 提交于
This is a partial backport of the below commit from upstream, with one hunk removed as it touches code yet in the future of this fork and another hunk massaged to account for path changes. Since we want the pg_upgrade hunk from this commit to silenve Coverity, we may as well grab all the hunks that are relevant and close those leaks ahead time in the fork. commit f712289f Author: Heikki Linnakangas <heikki.linnakangas@iki.fi> Date: Thu Jul 2 20:58:51 2015 +0300 Plug some trivial memory leaks in pg_dump and pg_upgrade. There's no point in trying to free every small allocation in these programs that are used in a one-shot fashion, but these ones seems like an improvement on readability grounds. Michael Paquier, per Coverity report.
-
由 Daniel Gustafsson 提交于
-
- 08 8月, 2018 7 次提交
-
-
For a PL/pgSQL function like the following: set optimizer_trace_fallback to on; CREATE OR REPLACE FUNCTION boom() RETURNS bool AS $$ DECLARE mel bool; sesh int[]; BEGIN sesh := '{42,1}'::int[]; -- query 1 select c = ANY (sesh) INTO mel FROM (values (42), (0)) nums(c); -- query 2 return mel; END $$ LANGUAGE plpgsql VOLATILE; SELECT boom(); With Orca enabled, the database crashes. Starting in 9.2, PL/pgSQL supplies bound param values in more statement types to enable planner to fold constants in more cases. This is in contrast to leaving the param intact and waiting until execution to substitute it with its values. Previously, only dynamic execution ("EXECUTE 'SELECT $1' USING sesh") gets this treatment. This revealed the bug because Orca would not have been able to plan queries whose query trees included params that were not in subplans (external params) and would just fall back. When query 1 is planned, it is translated into select '{42,1}'::int[]; For uninteresting reasons, the planner-produced plan for query 1 is considered "simple", and the ORCA-produced plan is considered regular (not simple). PL/pgSQL has a fast-path for "simple" plans, minimally starting the executor via `ExecEvalExpr`. Regular plans are executed through SPI. During execution, SPI will pack (as part of `heap_form_tuple`) the 4-byte header datum into a 1-byte header datum. While planning query 2, we will attempt to substitute the param "sesh" with the actual const value during pre-processing. Since Orca doesn't recognize const arrays as arrays, the translator will take the additional step of translating the const into an array expression. When accessing the array-typed const, we need to "unpack" (`DatumGetArrayTypeP`) the datum. This commit does that. Co-authored-by: NMelanie Plageman <mplageman@pivotal.io>
-
由 yanchaozhong 提交于
There are a lot of blank lines in the 'gpinitsystem' log. These are read directly from the configuration file using commands 'cat'. The comments are turned into blank lines, but they are not removed: gpinitsystem:node:gp6-[INFO]:-Start Main gpinitsystem:node:gp6-[INFO]:-Command line options passed to utility = -c ../gpinitsystem_config gpinitsystem:node:gp6-[INFO]:-Start Function CHK_GPDB_ID ... gpinitsystem:node:gp6-[INFO]:-End Function CHK_FILE gpinitsystem:node:gp6-[INFO]:-Dumping gpinitsystem_config to logfile for reference ARRAY_NAME="EMC Greenplum DW" SEG_PREFIX=gpseg PORT_BASE=40300 This extends the exclusion regex used when appending to the logfile to remove blank lines completely and to handle comments that doesn't start on column zero. Co-authored-by: NDaniel Gustafsson <dgustafsson@pivotal.io> Reviewed-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
-
由 Daniel Gustafsson 提交于
Commit 8e60838c22735fcacabc125170fc1d removed PG_PRINTF_ATTRIBUTE from pg_config_manual.h, which exposed the fact that gpmapreduce was erroneously including that header instead of the correct one. Instead include postgres_fe.h for now, as gpmapreduce is client side tool and not a separated extension, to fix compilation. Reviewed-by: NAsim R P <apraveen@pivotal.io>
-
由 Daniel Gustafsson 提交于
The GUCs controlling filerep were removed when filerep was replaced by walrep, but the documentation hasn't caught up. Remove mentions of filerep GUCs as they no longer exist. Reviewed-by: NAsim R P <apraveen@pivotal.io> Reviewed-by: NMel Kiyama <mkiyama@pivotal.io>
-
由 Xiaoran Wang 提交于
1)Refactor function externalgettup_custom scan->raw_buf_done means there is no new data in the formatter->fmt_databuf( a block data) for the formatter to process. Maybe there is some data left in the fmt_databuf, but it is not a complete tuple and formatter can not process it .pstate->fe_eof means has no data left in the external file. When scan->raw_buf_done and pstate->fe_eof are both true, it means there is no new data for formatter to process. If there is no new data and still there is some data in the formatter->fmt_databuf, it means the external file is not complete. 2) ereports WARNING instead of ERROR if the external file is not complete. If reports error, the transaction will rollback. To ignore the incomplete data at the end of file is better.
-
由 Jinbao Chen 提交于
Nowait could set false, when we get a object address
-
由 Lisa Owen 提交于
-
- 07 8月, 2018 9 次提交
-
-
由 Kevin Grittner 提交于
The bug would only show up if the C sockaddr structure contained zero in the first byte for a valid address; otherwise it would fail to fail, which is probably why it went unnoticed for so long. Patch submitted by Joel Jacobson after seeing an article by Andrey Karpov in which he reports finding this through static code analysis using PVS-Studio. While I was at it I moved a definition of a local variable referenced in the buggy code to a more local context. Backpatch to all supported branches.
-
由 Jinbao Chen 提交于
Remove GPDB_92_MERGE_FIXME in cdbpath.c and change create_new_ph from 'true' to false. When the function 'add_vars_to_targetlist' is called. The param 'create_new_ph' should be true before deconstruct_jointree, and false after that. The funtion 'cdbpath_dedup_fixup_baserel' is always called after deconstruct_jointree. So it should be false.
-
由 Paul Guo 提交于
These were detected by compiler option -Wimplicit-fallthrough (gcc 7.x). Some of these issues are introduced by git merge during postgres merge. We've seen similar cases (missing break) several times so we probably want this compiler option as the default in the future after we modify code to remove all or most false alarms. Before that, we will need to run with this option locally during postgres merge.
-
由 Paul Guo 提交于
GPDB includes newer PG code that detects PG_PRINTF_ATTRIBUTE automatically, thus there is no need to define it in pg_config_manual.h.
-
由 Bhuvnesh Chaudhary 提交于
The commit a3f7f4d7 introduced a fall back if the query contained ONLY in the FROM clause for relations. However, it should exclude external tables. For external tables RangeTblEntry::inh is set to false always, so the commit causes ORCA to fall back for all external table queries. This commit fixes the issue by excluding external tables from the check of ONLY clause in CTranslatorQueryToDXL::PdxlnFromRelation(), and adds relevant test cases.
-
由 Daniel Gustafsson 提交于
FindOperatorGroupForNode() has been commented out for six years almost to the day, with no reason in the original commit as to why it was commented out in the first place. Remove since it clearly is neither used nor needed. Reviewed-by: NJoao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io>
-
由 Venkatesh Raghavan 提交于
-
由 Venkatesh Raghavan 提交于
-
由 Venkatesh Raghavan 提交于
-
- 06 8月, 2018 4 次提交
-
-
由 Ekta Khanna 提交于
This commit removes the FIXME along with the code that was disabled as part of the FIXME, since it is no more relevant. Prior to the merge, this code was introduced to handle the following cases: 1. In case of UPDATE, DELETE and INSERT, we would set all plans to `DISPATCH_PARALLEL` if the relation is either POLICYTYPE_REPLICATED or POLICYTYPE_PARTITIONED 2. If UPDATE, DELETE and INSERT have returning as part of the sql and the relation is either `POLICYTYPE_REPLICATED` or `POLICYTYPE_PARTITIONED`, it should error out as `RETURNING` was not supported. Post merge, 1. The dispatch for UPDATE, DELETE and INSERT plan is set to `DISPATCH_PARALLEL` in the function `prescan()`, called later in the code, based on `FLOW` Earlier, the checks were explicitly required before the `prescan()` as this function sets the `DISPATCH_PARALLEL` based on `FLOW` and the necessary `FLOW` information was not passed on for all cases. Now, for UPDATE, DELETE and INSERT plans, planner creates a `ModifyTable` plan node and the appropriate FLOW information is set for it in `adjust_modifytable_flow()`, including the case where the relation is either POLICYTYPE_PARTITIONED or POLICYTYPE_REPLICATED. Additionally, for case of no-op queries(as shown below), where we do not create a `ModifyTable` plan node, we do not need to set the plan dispatch as `DISPATCH_PARALLEL` ``` CREATE TABLE target(a int, b int, c int) PARTITION BY RANGE(c) (START(0) END(6) EVERY(3)); UPDATE target SET b=10 where c =10; ``` 2. As part of the merge, commit 8a736a5f enabled `RETURNING` support in GPDB, leaving case 2 above irrelevant.
-
由 Daniel Gustafsson 提交于
To avoid format poisoning and possible exploitation (albetit unlileky), always pass a format string to gfile_printf_then_putc_newline(). This avoids compiler warnings like the following: warning: format string is not a string literal (potentially insecure) gfile_printf_then_putc_newline(*response_string); ^~~~~~~~~~~~~~~~ Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io>
-
由 yanchaozhong 提交于
gptransfer version shows an error because there is no replacement for the Revision placeholder text at compile time. $ gptransfer --version gptransfer version $Revision: #1 $ Example of the expected right output: $ gpstart --version gpstart version 6.0.0 alpha.0+dev.7519.g6d629f7a build dev oss $ gpstop --version gpstop version 6.0.0 alpha.0+dev.7519.g6d629f7a build dev oss Reviewed-by: NDaniel Gustafsson <dgustafsson@pivotal.io>
-
由 Alexandra Wang 提交于
This asserssion has been commented out for 6 months and ORCA works just fine without it. Authored-by: NAlexandra Wang <leiwangcheme@gmail.com>
-
- 05 8月, 2018 2 次提交
-
-
由 Daniel Gustafsson 提交于
This GUC was purely for developer use, but can just as well be replaced by the developer inserting the desired elog() calls when hacking. Remove to avoid spending a GUC on this. Discussion: https://groups.google.com/a/greenplum.org/forum/#!topic/gpdb-dev/L_UX23R6goIReviewed-by: NAsim R P <apraveen@pivotal.io> Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io> Reviewed-by: NJoao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io>
-
由 Daniel Gustafsson 提交于
The START TRANSACTION commands requires the ISOLATION LEVEL keywords before the actual transaction isolation name. Reviewed-by: NAsim R P <apraveen@pivotal.io> Reviewed-by: NJoao Pedro De Almeida Pereira <jdealmeidapereira@pivotal.io> Reviewed-by: NMel Kiyama <mkiyama@pivotal.io>
-
- 04 8月, 2018 3 次提交
-
-
由 Bhuvnesh Chaudhary 提交于
-
由 Abhijit Subramanya 提交于
Queries of the form would fail due to a tripped assertion ``` explain (select a from foo except select a from foo order by a) UNION (select a from foo except select a from foo order by a); FATAL: Unexpected internal error (analyze.c:2393) DETAIL: FailedAssertion("!(pstate->p_setopTypes && pstate->p_setopTypmods)", File: "analyze.c", Line: 2393) HINT: Process 98860 will wait for gp_debug_linger=120 seconds before termination. ``` The commit 352362a6 which refactored the way the types of the columns are determined in UNION queries fixes the issue. This test is to ensure that the issue is fixed.
-
由 Jimmy Yih 提交于
An AO table should not be able to be created with zstandard compression if the build was not compiled with zstandard libraries. This is a small hack for now until we have refactored the way different compression types are plugged into our AO table logic.
-
- 03 8月, 2018 6 次提交
-
-
由 Omer Arap 提交于
9.2 merge increases the statistics slots from 4 to 5 in `pg_statistics`. This requires an update in gpsd and minirepro tools as the statistics needs to be dumped correctly.
-
由 Daniel Gustafsson 提交于
Since VmemTracker_GetChunkSizeInBits() returns int32, the compiler will use 32-bit integer arithmetic for the shift, even though the resulting variable is 64-bit wide. Cast the constant to int64 to ensure we don't risk a 32-bit overflow where we can store it. This matches other uses of VmemTracker_GetChunkSizeInBits() where we want a 64-bit result. Reported-by: Coverity static analysis. Reviewed-by: NShreedhar A Hardikar <shardikar@pivotal.io>
-
由 Daniel Gustafsson 提交于
The definitions of PQArgBlock in libpq.h and libpq-fe.h were in conflict with each other when including both. The definition in libpq.h was superfluous and removed in 23c7b583, so remove the redefines to clean up the code. Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io>
-
由 Tom Lane 提交于
This struct is purely a client-side artifact. Perhaps there was once reason for the server to know it, but any such reason is lost in the mists of time. We certainly don't need two independent declarations of it.
-
由 Daniel Gustafsson 提交于
The errmsg() contained the error message as well as the error detail and in one case the hint too. Break up and fix punctuation to match how error messages are written. Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io>
-
由 Daniel Gustafsson 提交于
The recent COPY refactoring left cdbCopyEnd() unused, so remove the function as it's now dead code. Also clean up a comment which erroneously was referring to it. Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io>
-