forked from nahanni/rw_redis_fdw
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pgsql 16 and 17 support #22
Draft
petrov9268
wants to merge
5
commits into
luxms:master
Choose a base branch
from
petrov9268:pgsql-16-17
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Builds just fine with servers ranging between Supported versions build on initial and the latest version (e.g. There is a problem when building with --00:02:32:11.310 517-- Reading syms from /usr/local/pgsql/lib/plpgsql.so
--00:02:32:11.884 517-- REDIR: 0x4ab2c60 (libc.so.6:__wcsnlen_avx2) redirected to 0x4852760 (wcsnlen)
--00:02:32:11.913 517-- Reading syms from /usr/local/pgsql/lib/redis_fdw.so
--00:02:32:11.916 517-- Reading syms from /usr/lib64/libhiredis.so.1.0.0
--00:02:32:12.004 517-- REDIR: 0x4aaf260 (libc.so.6:__strncasecmp_avx2) redirected to 0x484e140 (strncasecmp)
--00:02:32:12.009 517-- REDIR: 0x4ae8820 (libc.so.6:__strpbrk_sse42) redirected to 0x4852470 (strpbrk)
--00:02:32:12.050 517-- REDIR: 0x4aad330 (libc.so.6:__strcasecmp_avx2) redirected to 0x484e060 (strcasecmp)
==00:02:32:12.156 517== Invalid read of size 2
==00:02:32:12.156 517== at 0x48512EF: memmove (vg_replace_strmem.c:1410)
==00:02:32:12.156 517== by 0xE78D1B4: redis_deserialize_rtable (redis_fdw.c:835)
==00:02:32:12.156 517== by 0xE78D9B7: redis_deserialize_fdw (redis_fdw.c:996)
==00:02:32:12.156 517== by 0xE791BB9: redisBeginForeignScan (redis_fdw.c:2486)
==00:02:32:12.156 517== by 0x772AF2: ExecInitForeignScan (nodeForeignscan.c:286)
==00:02:32:12.156 517== by 0x754EFF: ExecInitNode (execProcnode.c:285)
==00:02:32:12.156 517== by 0x74A77F: InitPlan (execMain.c:938)
==00:02:32:12.156 517== by 0x74974B: standard_ExecutorStart (execMain.c:265)
==00:02:32:12.156 517== by 0x7494B1: ExecutorStart (execMain.c:144)
==00:02:32:12.156 517== by 0x7AD9B3: _SPI_pquery (spi.c:2918)
==00:02:32:12.156 517== by 0x7AD442: _SPI_execute_plan (spi.c:2690)
==00:02:32:12.156 517== by 0x7AA3F3: SPI_execute_plan_with_paramlist (spi.c:749)
==00:02:32:12.156 517== Address 0xe16dc08 is 632 bytes inside a block of size 1,024 alloc'd
==00:02:32:12.156 517== at 0x484480F: malloc (vg_replace_malloc.c:442)
==00:02:32:12.156 517== by 0xB5CC8F: AllocSetAlloc (aset.c:920)
==00:02:32:12.156 517== by 0xB69478: MemoryContextAllocZeroAligned (mcxt.c:956)
==00:02:32:12.156 517== by 0x7CE504: _copyVar (copyfuncs.c:1451)
==00:02:32:12.156 517== by 0x7D8F12: copyObjectImpl (copyfuncs.c:5266)
==00:02:32:12.156 517== by 0x7D0020: _copyTargetEntry (copyfuncs.c:2227)
==00:02:32:12.156 517== by 0x7D9284: copyObjectImpl (copyfuncs.c:5392)
==00:02:32:12.156 517== by 0x7ECB93: list_copy_deep (list.c:1611)
==00:02:32:12.156 517== by 0x7D93D4: copyObjectImpl (copyfuncs.c:5452)
==00:02:32:12.156 517== by 0x7CB32A: CopyPlanFields (copyfuncs.c:132)
==00:02:32:12.156 517== by 0x7CBEB6: CopyScanFields (copyfuncs.c:420)
==00:02:32:12.156 517== by 0x7CC6CC: _copyForeignScan (copyfuncs.c:779)
==00:02:32:12.156 517==
{
<insert_a_suppression_name_here>
Memcheck:Addr2
fun:memmove
fun:redis_deserialize_rtable
fun:redis_deserialize_fdw
fun:redisBeginForeignScan
fun:ExecInitForeignScan
fun:ExecInitNode
fun:InitPlan
fun:standard_ExecutorStart
fun:ExecutorStart
fun:_SPI_pquery
fun:_SPI_execute_plan
fun:SPI_execute_plan_with_paramlist
}
==00:02:32:12.156 517== Invalid read of size 2
==00:02:32:12.156 517== at 0x48512E0: memmove (vg_replace_strmem.c:1410)
==00:02:32:12.156 517== by 0xE78D1B4: redis_deserialize_rtable (redis_fdw.c:835)
==00:02:32:12.156 517== by 0xE78D9B7: redis_deserialize_fdw (redis_fdw.c:996)
==00:02:32:12.156 517== by 0xE791BB9: redisBeginForeignScan (redis_fdw.c:2486)
==00:02:32:12.156 517== by 0x772AF2: ExecInitForeignScan (nodeForeignscan.c:286)
==00:02:32:12.156 517== by 0x754EFF: ExecInitNode (execProcnode.c:285)
==00:02:32:12.156 517== by 0x74A77F: InitPlan (execMain.c:938)
==00:02:32:12.156 517== by 0x74974B: standard_ExecutorStart (execMain.c:265)
==00:02:32:12.156 517== by 0x7494B1: ExecutorStart (execMain.c:144)
==00:02:32:12.156 517== by 0x7AD9B3: _SPI_pquery (spi.c:2918)
==00:02:32:12.156 517== by 0x7AD442: _SPI_execute_plan (spi.c:2690)
==00:02:32:12.156 517== by 0x7AA3F3: SPI_execute_plan_with_paramlist (spi.c:749)
==00:02:32:12.156 517== Address 0xe16dc0a is 634 bytes inside a block of size 1,024 alloc'd
==00:02:32:12.156 517== at 0x484480F: malloc (vg_replace_malloc.c:442)
==00:02:32:12.156 517== by 0xB5CC8F: AllocSetAlloc (aset.c:920)
==00:02:32:12.156 517== by 0xB69478: MemoryContextAllocZeroAligned (mcxt.c:956)
==00:02:32:12.156 517== by 0x7CE504: _copyVar (copyfuncs.c:1451)
==00:02:32:12.156 517== by 0x7D8F12: copyObjectImpl (copyfuncs.c:5266)
==00:02:32:12.156 517== by 0x7D0020: _copyTargetEntry (copyfuncs.c:2227)
==00:02:32:12.156 517== by 0x7D9284: copyObjectImpl (copyfuncs.c:5392)
==00:02:32:12.156 517== by 0x7ECB93: list_copy_deep (list.c:1611)
==00:02:32:12.156 517== by 0x7D93D4: copyObjectImpl (copyfuncs.c:5452)
==00:02:32:12.156 517== by 0x7CB32A: CopyPlanFields (copyfuncs.c:132)
==00:02:32:12.156 517== by 0x7CBEB6: CopyScanFields (copyfuncs.c:420)
==00:02:32:12.156 517== by 0x7CC6CC: _copyForeignScan (copyfuncs.c:779)
==00:02:32:12.156 517==
{
<insert_a_suppression_name_here>
Memcheck:Addr2
fun:memmove
fun:redis_deserialize_rtable
fun:redis_deserialize_fdw
fun:redisBeginForeignScan
fun:ExecInitForeignScan
fun:ExecInitNode
fun:InitPlan
fun:standard_ExecutorStart
fun:ExecutorStart
fun:_SPI_pquery
fun:_SPI_execute_plan
fun:SPI_execute_plan_with_paramlist
}
==00:02:32:12.157 517== Invalid read of size 2
==00:02:32:12.157 517== at 0x48512EF: memmove (vg_replace_strmem.c:1410)
==00:02:32:12.157 517== by 0xE78D25D: redis_deserialize_rtable_cols (redis_fdw.c:886)
==00:02:32:12.157 517== by 0xE78D9E4: redis_deserialize_fdw (redis_fdw.c:999)
==00:02:32:12.157 517== by 0xE791BB9: redisBeginForeignScan (redis_fdw.c:2486)
==00:02:32:12.157 517== by 0x772AF2: ExecInitForeignScan (nodeForeignscan.c:286)
==00:02:32:12.157 517== by 0x754EFF: ExecInitNode (execProcnode.c:285)
==00:02:32:12.157 517== by 0x74A77F: InitPlan (execMain.c:938)
==00:02:32:12.157 517== by 0x74974B: standard_ExecutorStart (execMain.c:265)
==00:02:32:12.157 517== by 0x7494B1: ExecutorStart (execMain.c:144)
==00:02:32:12.157 517== by 0x7AD9B3: _SPI_pquery (spi.c:2918)
==00:02:32:12.157 517== by 0x7AD442: _SPI_execute_plan (spi.c:2690)
==00:02:32:12.157 517== by 0x7AA3F3: SPI_execute_plan_with_paramlist (spi.c:749)
==00:02:32:12.157 517== Address 0xe16dcfc is 876 bytes inside a block of size 1,024 alloc'd
==00:02:32:12.157 517== at 0x484480F: malloc (vg_replace_malloc.c:442)
==00:02:32:12.157 517== by 0xB5CC8F: AllocSetAlloc (aset.c:920)
==00:02:32:12.157 517== by 0xB69478: MemoryContextAllocZeroAligned (mcxt.c:956)
==00:02:32:12.157 517== by 0x7CE504: _copyVar (copyfuncs.c:1451)
==00:02:32:12.157 517== by 0x7D8F12: copyObjectImpl (copyfuncs.c:5266)
==00:02:32:12.157 517== by 0x7D0020: _copyTargetEntry (copyfuncs.c:2227)
==00:02:32:12.157 517== by 0x7D9284: copyObjectImpl (copyfuncs.c:5392)
==00:02:32:12.157 517== by 0x7ECB93: list_copy_deep (list.c:1611)
==00:02:32:12.157 517== by 0x7D93D4: copyObjectImpl (copyfuncs.c:5452)
==00:02:32:12.157 517== by 0x7CB32A: CopyPlanFields (copyfuncs.c:132)
==00:02:32:12.157 517== by 0x7CBEB6: CopyScanFields (copyfuncs.c:420)
==00:02:32:12.157 517== by 0x7CC6CC: _copyForeignScan (copyfuncs.c:779)
==00:02:32:12.157 517==
{
<insert_a_suppression_name_here>
Memcheck:Addr2
fun:memmove
fun:redis_deserialize_rtable_cols
fun:redis_deserialize_fdw
fun:redisBeginForeignScan
fun:ExecInitForeignScan
fun:ExecInitNode
fun:InitPlan
fun:standard_ExecutorStart
fun:ExecutorStart
fun:_SPI_pquery
fun:_SPI_execute_plan
fun:SPI_execute_plan_with_paramlist
}
==00:02:32:12.157 517== Invalid read of size 2
==00:02:32:12.157 517== at 0x48512E0: memmove (vg_replace_strmem.c:1410)
==00:02:32:12.157 517== by 0xE78D25D: redis_deserialize_rtable_cols (redis_fdw.c:886)
==00:02:32:12.157 517== by 0xE78D9E4: redis_deserialize_fdw (redis_fdw.c:999)
==00:02:32:12.157 517== by 0xE791BB9: redisBeginForeignScan (redis_fdw.c:2486)
==00:02:32:12.157 517== by 0x772AF2: ExecInitForeignScan (nodeForeignscan.c:286)
==00:02:32:12.157 517== by 0x754EFF: ExecInitNode (execProcnode.c:285)
==00:02:32:12.157 517== by 0x74A77F: InitPlan (execMain.c:938)
==00:02:32:12.157 517== by 0x74974B: standard_ExecutorStart (execMain.c:265)
==00:02:32:12.157 517== by 0x7494B1: ExecutorStart (execMain.c:144)
==00:02:32:12.157 517== by 0x7AD9B3: _SPI_pquery (spi.c:2918)
==00:02:32:12.157 517== by 0x7AD442: _SPI_execute_plan (spi.c:2690)
==00:02:32:12.157 517== by 0x7AA3F3: SPI_execute_plan_with_paramlist (spi.c:749)
==00:02:32:12.157 517== Address 0xe16dcfe is 878 bytes inside a block of size 1,024 alloc'd
==00:02:32:12.157 517== at 0x484480F: malloc (vg_replace_malloc.c:442)
==00:02:32:12.157 517== by 0xB5CC8F: AllocSetAlloc (aset.c:920)
==00:02:32:12.157 517== by 0xB69478: MemoryContextAllocZeroAligned (mcxt.c:956)
==00:02:32:12.157 517== by 0x7CE504: _copyVar (copyfuncs.c:1451)
==00:02:32:12.157 517== by 0x7D8F12: copyObjectImpl (copyfuncs.c:5266)
==00:02:32:12.157 517== by 0x7D0020: _copyTargetEntry (copyfuncs.c:2227)
==00:02:32:12.157 517== by 0x7D9284: copyObjectImpl (copyfuncs.c:5392)
==00:02:32:12.157 517== by 0x7ECB93: list_copy_deep (list.c:1611)
==00:02:32:12.157 517== by 0x7D93D4: copyObjectImpl (copyfuncs.c:5452)
==00:02:32:12.157 517== by 0x7CB32A: CopyPlanFields (copyfuncs.c:132)
==00:02:32:12.157 517== by 0x7CBEB6: CopyScanFields (copyfuncs.c:420)
==00:02:32:12.157 517== by 0x7CC6CC: _copyForeignScan (copyfuncs.c:779)
==00:02:32:12.157 517==
{
<insert_a_suppression_name_here>
Memcheck:Addr2
fun:memmove
fun:redis_deserialize_rtable_cols
fun:redis_deserialize_fdw
fun:redisBeginForeignScan
fun:ExecInitForeignScan
fun:ExecInitNode
fun:InitPlan
fun:standard_ExecutorStart
fun:ExecutorStart
fun:_SPI_pquery
fun:_SPI_execute_plan
fun:SPI_execute_plan_with_paramlist
} Script to reproduce: CREATE FOREIGN TABLE IF NOT EXISTS rft_str(
key TEXT,
value TEXT,
expiry INT
) SERVER localredis
OPTIONS (tabletype 'string', database '1');
CREATE OR REPLACE FUNCTION where_clause_func_expr()
RETURNS TEXT
LANGUAGE plpgsql
AS $$
BEGIN
DECLARE
_str TEXT = 'strkey';
_val TEXT;
BEGIN
SELECT value INTO _val FROM rft_str WHERE key = lower(_str);
RETURN _val;
END;
END;
$$;
SELECT where_clause_func_expr(); This can be a false positive, but it is a good idea to check it out. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
pgsql 16
and17
supportDo not merge.
Currently only tested on
16.0
,16.4
and17.0
, previous versions may be broken due to changes made forpgsql 16
support.