- 11 8月, 2017 1 次提交
-
-
由 foyzur 提交于
We set CDB_PALLOC_TAGS regardless of USE_ASSERT_CHECKING on 81627e27. This bloated chunk header in release build, resulting in significantly more memory consumption in certain cases. In this PR we are restoring the original behavior by setting CDB_PALLOC_TAGS only when USE_ASSERT_CHECKING is set. We are also removing unused code. Signed-off-by: NFoyzur Rahman <foyzur@gmail.com>
-
- 10 8月, 2017 7 次提交
-
-
由 Heikki Linnakangas 提交于
This cuts down the size of each test program from about 45 MB to 41 MB on my laptop, with debug-enabled builds. That should help to speed up the tests a little bit.
-
由 Heikki Linnakangas 提交于
One less test program makes the tests to go a tiny bit faster. This also tests more directly the problem with the GUCs that the low-level function was added for, rather than the low-level function. Arguably we don't need a test for any of this at all anymore, as this fix for the ALTER USER RESET ALL bug was backported from PostgreSQL a long time ago, but at this point, we have caught up with that PostgreSQL code and the GPDB code is identical to the upstream. But OTOH, it's easy and quick to test as a pg_regress test, so might as well.
-
由 Pengzhou Tang 提交于
resource group tests are messing up isolation2 directory, this commits move them all to the same directory to be tidy and organized, it also handle the sub directory in input/output directory for resgroup.
-
由 Jacob Champion 提交于
Signed-off-by: NXin Zhang <xzhang@pivotal.io>
-
由 Ashwin Agrawal 提交于
Occationally, the test failed saying syntax error of pg_terminate_backend, due to the bug in test fetching multiple procpid if there are multiple `create temp table t%` statements, which do happen occationally with ORCA on separate slices. The fix is to always pick the oldest procpid, and also double check the process is the one test started. We are leveraging the new feature in pg_terminate_backend to provide additional message to verify the proper process is terminated. Signed-off-by: NXin Zhang <xzhang@pivotal.io> Signed-off-by: NJacob Champion <pchampion@pivotal.io>
-
由 khannaekta 提交于
Fix Relcache Translator to send CoercePath info Currently ORCA crashes while executing following query: ``` CREATE TABLE FOO(a integer NOT NULL, b double precision[]); SELECT b FROM foo UNION ALL SELECT ARRAY[90, 90] as Cont_features; ``` In the query, we are appending an integer array (ARRAY[90, 90]) to a double precision array (foo.b) and hence we need to apply a cast on ARRAY[90, 90] to generate ARRAY[90, 90]::double precision[]. In gpdb5 there is not direct function available that can cast array of any type to array of any other type. So in relcache to dxl translator we look into the array elements and get their type and try to find a cast function for them. For this query, source type is 23 i.e. integer and destination type is 701 i.e. double precision and we try to find if we have a conversion function for 23 -> 701. Since that is available we send that function to ORCA as follows: ``` <dxl:MDCast Mdid="3.1007.1.0;1022.1.0" Name="float8" BinaryCoercible="false" SourceTypeId="0.1007.1.0" DestinationTypeId="0.1022.1.0" CastFuncId="0.316.1.0"/> ``` Here we are misinforming ORCA by specifying that function with id 316 is available to convert type 1007 i.e. integer array to 1022 i.e. double precision array. However Function id 316 is simple int4 to float8 conversion function and it CAN NOT convert an array of int4 to array of double precision. ORCA generates a plan using this function but executor crashes while executing this function because this function can not handle arrays. This commit fixes this issue by passing a ArrayCoercePath info to ORCA. In Relcache Translator, The appropriate cast function is retrieved in `gpdb::FCastFunc()` which relies on `find_coercion_pathway()` to provide the cast function oid given the src and dest types. `find_coercion_pathway()` does not just determines the cast function to be used but also determines the coercion path; however we ignored the coercision path and generate a simple Cast Metadata Object. With this commit, we now pass the pathtype to relcache translator and generate ArrayCoerceCast Metadata object depending on the coercion path. In ORCA, when the dxl is translated to expression, we check the path type along with the cast function and generate `CScalarArrayCoerceExpr` if the path type is array coerce path; otherwise we generate simple `CScalaraCast`. Please check the corresponding ORCA PR. Bump ORCA version to 2.40 Signed-off-by: NBhuvnesh Chaudhary <bchaudhary@pivotal.io>
-
由 Heikki Linnakangas 提交于
I don't understand why gpdiff didn't pick this rule up from the src/test/regress/init_file file. But this seems to fix it, so let's get this in for now, to make the pipeline green.
-
- 09 8月, 2017 17 次提交
-
-
由 Heikki Linnakangas 提交于
Commit f52fbe57 removed these gpdiff rules rules from src/test/regress, because all the tests there now use the gp_inject_fault extension instead of the gpfaultinjector command-line tool. But I didn't realize that the isolation2 test suite shares the same ignore rules, and they still use gpfaultinjector.
-
由 Heikki Linnakangas 提交于
This replaces all places in regression tests, where the gpfaultinject binary was used, with the SQL-callable function in the new gp_inject_fault extension. The SQL function is more forgivin about the dev environemnt, and doesn't need gpfaultinject to be in $PATH, for starters. Also, it's just good to harmonize and have just one way of injecting faults. More uses of gpfaultinject remain in the TINC tests, so we cannot get rid of it any time soon, but this is a step in that direction, anyway.
-
由 Heikki Linnakangas 提交于
* Turn it into an extension, for easier installation. * Add a simpler variant of the gp_inject_fault function, with less options. This is applicable to almost all the calls in the regression suite, so it's nice to make them less verbose. * Change the dbid argument from smallint to int4. For convenience, so that you don't need a cast when calling the function.
-
由 Pengzhou Tang 提交于
cf7cddf7 has conflict with cc38f526, struct PQExpBufferData is needed by structure SegmentDatabaseDescriptor, so bring gp-libpq-int.h back
-
由 Pengzhou Tang 提交于
The whole cdb directory was shipped to end users and all header files that cdb*.h included are also need to be shipped to make checkinc.py pass. However, exposing gp_libpq_fe/*.h will confuse customer because they are almost the same as libpq/*, as Heikki's suggestion, we should keep gp_libpq_fe/* unchanged. So to make system work, we include gp-libpg-fe.h and gp-libpq-int.h directly in c files that need them
-
由 Pengzhou Tang 提交于
Formarly, GPDB are not allowed to expose gpdb-specified headers in cdb to the end users, so some public headers depend on those headers need to do some additional work like re-typedef, adjusting the header order in c files to pass checkinc.py. Now the limitation is unnecessary, so we expose them too for relief. cdbicudpfaultinjection.h may include sys/poll.h, so add it to the hard code standard includes
-
由 Pengzhou Tang 提交于
It was very difficult to verify if interconnect is stucked in resending phase or if there is udp resending latency within interconnect. To improve it, this commit record a debug message every Gp_interconnect_debug_retry_interval times when gp_log_interconnect is set to DEBUG.
-
由 Pengzhou Tang 提交于
This case assumed that 'now' in bellow queries will produce different results. -- insert into xxx values (timestamp(2) without time zone 'now'); -- select timestamp(2) without time zone 'now'; However, the results are undetermined and may be equal on powerful agents, the test is all about as alias so it's ok to add 2 seconds to the second 'now' to guarantee they are never equal.
-
由 Bhuvnesh Chaudhary 提交于
In ORCA, we donot process interrupts during planning stage, however if there are elog/ereport (which further calls errfinish) statements to print additional messages we prematurely exit out the planning stage without cleaning up the memory pools leading to inconsistent memory pool state. This results in crashes for the subsequent queries. This commit fixes the issue by handling interrupts while printing messages using elog/ereport in ORCA. Signed-off-by: NEkta Khanna <ekhanna@pivotal.io>
-
由 Heikki Linnakangas 提交于
Will hopefully reduce silly merge conflicts in the future.
-
由 Heikki Linnakangas 提交于
They don't exist in the upstream. All but one of the callers actually just needed list_member_*().
-
由 Heikki Linnakangas 提交于
These functions are defined in cdbpartition.c, not tablecmds.c. The prototypes should be in matching header file.
-
由 Heikki Linnakangas 提交于
-
由 Heikki Linnakangas 提交于
-
由 Heikki Linnakangas 提交于
To match the upstream code.
-
由 Heikki Linnakangas 提交于
Seems harmless, in this direction, but let's be tidy.
-
由 Heikki Linnakangas 提交于
This gets rid of the GPDB-specific "QE details" message, that was only sent once at QE backend startup, to notify the QD about the motion listener port of the QE backend. Use a standard ParameterStatus message instead, pretending that there is a GUC called "qe_listener_port". This reduces the difference between the gp_libpq_fe copy of libpq, and libpq proper. I have a dream that one day we will start using the standard libpq also for QD-QE communication, and get rid of the special gp_libpq_fe copy altogether, and this is a small step in that direction. In the passing, change the type of Gp_listener_port variable from signed to unsigned. Gp_listener_port actually holds two values: the TCP and UDP listener ports, and there is bit-shifting code to store those two 16-bit port numbers in the single 32-bit integer. But the bit-shifting was a bit iffy, on a signed integer. Making it unsigned makes it more clear what's happening.
-
- 08 8月, 2017 11 次提交
-
-
由 Xiaoran Wang 提交于
Forgot to toupper() the first character of string to strstr(). Signed-off-by: NXiaoran Wang <xiwang@pivotal.io>
-
由 Heikki Linnakangas 提交于
The variable was removed in PostgreSQL 8.3 (commit 7c5e5439), but this removal of the prototype was missed in the merge.
-
由 Heikki Linnakangas 提交于
-
由 Heikki Linnakangas 提交于
pcqCtx hasn't existed for some time, and we don't have prosrc as a variable here either.
-
由 Adam Lee 提交于
toupper() all characters, then strstr() instead.
-
由 Adam Lee 提交于
strcasestr() needs string.h
-
由 Heikki Linnakangas 提交于
StringInfo is more appropriate in backend code. (Unless the buffer needs to be used in a thread.) In the passing, rename the 'conn' static variable in cdbfilerepconnclient.c. It seemed overly generic.
-
由 Ning Yu 提交于
* Fix an assertion failure in resgroup. Suppose a resgroup already has a session assigned but no query running. In another session (not assigned to this resgroup) drop this resgroup and recreate it, then an assertion failure would be triggered. The cause is that the old resgroup's struct in shm is reused for the new resgroup, so on a QE who only owns a weak ref to this struct may find the struct's resgroup id different than its expection. To fix it we add the checks for such cases. * Changes according to PR reviews.
-
由 Xiaoran Wang 提交于
\copy command reads the file from the client filesystem but 'on segment' reads file from the segment system So \copy command and 'on segment' option are incompatible Signed-off-by: NXiaoran Wang <xiwang@pivotal.io>
-
由 Ashwin Agrawal 提交于
CID 173910 Dereference after null check. In markDirty: Pointer is checked against null but then dereferenced anyway. Removed the checking against and added Assert instead as don't see why relation should be NULL in markDirty(). CID 173667 Printf arg type mismatch. A printf format string does not match the types of one of the arguments. Fixed to make it only one %s and relpath() to get the path. Also, fixing the warning ``` guc.c:643:15: warning: incompatible pointer to integer conversion initializing 'bool' (aka 'char') with an expression of type 'void *' [-Wint-conversion] NULL, NULL, NULL ```
-
由 Heikki Linnakangas 提交于
Clean up after commits e40e78fa, 038aa959, 859d6592 and a21da89e. Tut tut.
-
- 07 8月, 2017 1 次提交
-
-
由 Pengzhou Tang 提交于
In commit 06f56fe8, we assigned a random segment to server as singleton QE for load blance. An assertion failure "outputSegIdx[0] == gp_singleton_segindex" occurs when plan contains initplans because apply_motion_mutator() did not set segindex of FLOW_SINGLETON to gp_singleton_segindex. Although segindex field did not affect the creation of singleton gang and also did not affect QE sending data to the right upstream, we still need making them consistent to silent the assertion and avoid potential issue.
-
- 05 8月, 2017 3 次提交
-
-
由 Daniel Gustafsson 提交于
[ci skip]
-
由 Ashwin Agrawal 提交于
We add the PT information in addition to the backup block for proper recovery. In this case, during XLog redo, the blocks of the dropped tables will not be restored after consulting PT. In order to fetch the PT information, we have to pass Relation to MarkBufferDirtyHint(). For that interface change, we refactored MarkBufferDirtyHint() with additional Relation parameter. The relation information is eventually passed to XLogSaveBufferForHint() to fetch the PT information when preparing the XLOG_HINT record.
-
由 Tom Lane 提交于
pg_filedump and other external utility programs are likely to want to be able to check Postgres page checksums. To avoid messy duplication of code, move the checksumming functionality into an exported header file, much as we did awhile back for the CRC code. In passing, get rid of an unportable assumption that a static char[] array will be word-aligned, and do some other minor code beautification. (cherry picked from commit f0421634)
-