BUG #17098: Assert failed on composing an error message when adding a type to an extension being dropped - Mailing list pgsql-bugs
From | PG Bug reporting form |
---|---|
Subject | BUG #17098: Assert failed on composing an error message when adding a type to an extension being dropped |
Date | |
Msg-id | 17098-b960f3616c861f83@postgresql.org Whole thread Raw |
Responses |
Re: BUG #17098: Assert failed on composing an error message when adding a type to an extension being dropped
|
List | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 17098 Logged by: Alexander Lakhin Email address: exclusion@gmail.com PostgreSQL version: 14beta2 Operating system: Ubuntu 20.04 Description: When trying to add to an extension a type that is already exists in the extension while the extension is being dropped I get a failed assertion with the following stack: Core was generated by `postgres: law regression [local] ALTER EXTENSION '. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f59c4321859 in __GI_abort () at abort.c:79 #2 0x000055c3c74912e0 in ExceptionalCondition (conditionName=conditionName@entry=0x55c3c76a024c "strvalue != NULL", errorType=errorType@entry=0x55c3c74f000b "FailedAssertion", fileName=0x7ffc8db80390 "\301\022I\307\303U", fileName@entry=0x55c3c76a0241 "snprintf.c", lineNumber=lineNumber@entry=442) at assert.c:69 #3 0x000055c3c74ee489 in dopr (target=target@entry=0x7ffc8db80970, format=0x55c3c7521ee7 "\"", format@entry=0x55c3c7521ec0 "%s is already a member of extension \"%s\"", args=0x7ffc8db80a20) at snprintf.c:442 #4 0x000055c3c74eeb5c in pg_vsnprintf (str=<optimized out>, count=<optimized out>, count@entry=1024, fmt=fmt@entry=0x55c3c7521ec0 "%s is already a member of extension \"%s\"", args=args@entry=0x7ffc8db80a20) at snprintf.c:195 #5 0x000055c3c74e4e33 in pvsnprintf (buf=<optimized out>, len=len@entry=1024, fmt=fmt@entry=0x55c3c7521ec0 "%s is already a member of extension \"%s\"", args=args@entry=0x7ffc8db80a20) at psprintf.c:110 #6 0x000055c3c74e6221 in appendStringInfoVA (str=str@entry=0x7ffc8db80a00, fmt=fmt@entry=0x55c3c7521ec0 "%s is already a member of extension \"%s\"", args=args@entry=0x7ffc8db80a20) at stringinfo.c:149 #7 0x000055c3c7495fbe in errmsg (fmt=fmt@entry=0x55c3c7521ec0 "%s is already a member of extension \"%s\"") at elog.c:919 #8 0x000055c3c7120cda in ExecAlterExtensionContentsStmt (stmt=stmt@entry=0x55c3c7810f60, objAddr=objAddr@entry=0x7ffc8db80c14) at extension.c:3342 #9 0x000055c3c7357837 in ProcessUtilitySlow (pstate=pstate@entry=0x55c3c7831d60, pstmt=pstmt@entry=0x55c3c7811270, queryString=queryString@entry=0x55c3c7810450 "ALTER EXTENSION cube ADD TYPE side;", context=context@entry=PROCESS_UTILITY_TOPLEVEL, params=params@entry=0x0, queryEnv=queryEnv@entry=0x0, dest=0x55c3c7811340, qc=0x7ffc8db81130) at utility.c:1550 #10 0x000055c3c7356b48 in standard_ProcessUtility (pstmt=0x55c3c7811270, queryString=0x55c3c7810450 "ALTER EXTENSION cube ADD TYPE side;", readOnlyTree=<optimized out>, context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x55c3c7811340, qc=0x7ffc8db81130) at utility.c:1049 #11 0x000055c3c7356c31 in ProcessUtility (pstmt=pstmt@entry=0x55c3c7811270, queryString=<optimized out>, readOnlyTree=<optimized out>, context=context@entry=PROCESS_UTILITY_TOPLEVEL, params=<optimized out>, queryEnv=<optimized out>, dest=0x55c3c7811340, qc=0x7ffc8db81130) at utility.c:527 #12 0x000055c3c7354157 in PortalRunUtility (portal=portal@entry=0x55c3c78725b0, pstmt=pstmt@entry=0x55c3c7811270, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x55c3c7811340, qc=qc@entry=0x7ffc8db81130) at pquery.c:1147 #13 0x000055c3c7354459 in PortalRunMulti (portal=portal@entry=0x55c3c78725b0, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x55c3c7811340, altdest=altdest@entry=0x55c3c7811340, qc=qc@entry=0x7ffc8db81130) at pquery.c:1304 #14 0x000055c3c735488d in PortalRun (portal=portal@entry=0x55c3c78725b0, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true, dest=dest@entry=0x55c3c7811340, altdest=altdest@entry=0x55c3c7811340, qc=0x7ffc8db81130) at pquery.c:786 #15 0x000055c3c7350ada in exec_simple_query ( query_string=query_string@entry=0x55c3c7810450 "ALTER EXTENSION cube ADD TYPE side;") at postgres.c:1214 #16 0x000055c3c7352aac in PostgresMain (argc=argc@entry=1, argv=argv@entry=0x7ffc8db81320, dbname=<optimized out>, username=<optimized out>) at postgres.c:4486 #17 0x000055c3c72ada9c in BackendRun (port=port@entry=0x55c3c7831220) at postmaster.c:4507 #18 0x000055c3c72b0cb1 in BackendStartup (port=port@entry=0x55c3c7831220) at postmaster.c:4229 #19 0x000055c3c72b0ef8 in ServerLoop () at postmaster.c:1745 #20 0x000055c3c72b2445 in PostmasterMain (argc=3, argv=<optimized out>) at postmaster.c:1417 #21 0x000055c3c71f309e in main (argc=3, argv=0x55c3c780a4c0) at main.c:209 Reproduced with the following script: echo " CREATE EXTENSION cube; DROP EXTENSION cube; " >/tmp/ce.sql echo " CREATE TYPE side AS ENUM('front'); ALTER EXTENSION cube ADD TYPE side; " >/tmp/ae.sql for n in `seq 10`; do echo "iteration $n" ( { for f in `seq 1000`; do cat /tmp/ce.sql; done } | psql ) >psql-1.log 2>&1 & ( { for f in `seq 1000`; do cat /tmp/ae.sql; done } | psql ) >psql-2.log 2>&1 & wait coredumpctl --no-pager && break done Reproduced on REL_12_STABLE..master. The assert was added by 6d842be6c, so on REL_11_STABLE I see just: ERROR: type side is already a member of extension "(null)"
pgsql-bugs by date: