Re: pgsql: Choose FK name correctly during partition attachment

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Choose FK name correctly during partition attachment
Date: 2022-09-08 18:50:56
Message-ID: 4104619.1662663056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Choose FK name correctly during partition attachment

Some of the buildfarm is unhappy with this, most clearly so here:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=lapwing&dt=2022-09-08%2015%3A30%3A25

ore was generated by `postgres: postgres regression [local] ALTER TABLE '.
Program terminated with signal 6, Aborted.
#0 0x2a460417 in raise () from /lib/i386-linux-gnu/libc.so.6
#0 0x2a460417 in raise () from /lib/i386-linux-gnu/libc.so.6
#1 0x2a463802 in abort () from /lib/i386-linux-gnu/libc.so.6
#2 0x0864edf8 in ExceptionalCondition (conditionName=conditionName(at)entry=0x878fc10 "*updateTriggerOid == InvalidOid", errorType=errorType(at)entry=0x86b174f "FailedAssertion", fileName=fileName(at)entry=0x878f1bb "tablecmds.c", lineNumber=lineNumber(at)entry=10591) at assert.c:69
#3 0x082e7c57 in GetForeignKeyActionTriggers (updateTriggerOid=<synthetic pointer>, deleteTriggerOid=<synthetic pointer>, conrelid=21128, confrelid=21128, conoid=21141, trigrel=0x213c28f0) at tablecmds.c:10591
#4 CloneFkReferenced (partitionRel=partitionRel(at)entry=0x212beb5c, parentRel=<error reading variable: Unhandled dwarf expression opcode 0xfa>, parentRel=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at tablecmds.c:10117
#5 0x082f19e9 in CloneForeignKeyConstraints (wqueue=0xffd430c0, parentRel=0x212b6a98, partitionRel=0x212beb5c) at tablecmds.c:9955
#6 0x082fc8c8 in ATExecAttachPartition (wqueue=wqueue(at)entry=0xffd430c0, rel=rel(at)entry=0x212b6a98, context=<error reading variable: Unhandled dwarf expression opcode 0xfa>, cmd=<error reading variable: Unhandled dwarf expression opcode 0xfa>, cmd=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at tablecmds.c:17852
#7 0x082ff709 in ATExecCmd (wqueue=wqueue(at)entry=0xffd430c0, tab=tab(at)entry=0x8e44180, cmd=0x8dff454, lockmode=lockmode(at)entry=4, cur_pass=cur_pass(at)entry=10, context=context(at)entry=0xffd43284) at tablecmds.c:5227
#8 0x08300e87 in ATRewriteCatalogs (context=0xffd43284, lockmode=4, wqueue=0xffd430c0) at tablecmds.c:4878
#9 ATController (parsetree=0x8d5d574, parsetree(at)entry=0x1, rel=<optimized out>, cmds=<optimized out>, recurse=true, lockmode=4, context=0xffd43284) at tablecmds.c:4455
#10 0x08302386 in AlterTable (stmt=0x1, stmt(at)entry=0x8d5d574, lockmode=lockmode(at)entry=4, context=0xffd43284, context(at)entry=0x1) at tablecmds.c:4101
#11 0x084f6ed9 in ProcessUtilitySlow (pstate=pstate(at)entry=0x8e4dc04, pstmt=pstmt(at)entry=0x8d5d614, queryString=queryString(at)entry=0x8d5ca54 "ALTER TABLE parted_fk_naming ATTACH PARTITION parted_fk_naming_1 FOR VALUES IN ('1');", context=context(at)entry=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, qc=0xffd43580, dest=<error reading variable: Unhandled dwarf expression opcode 0xfa>) at utility.c:1325
#12 0x084f5a28 in standard_ProcessUtility (pstmt=0x8d5d614, queryString=0x8d5ca54 "ALTER TABLE parted_fk_naming ATTACH PARTITION parted_fk_naming_1 FOR VALUES IN ('1');", readOnlyTree=false, context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x8d5d804, qc=0xffd43580) at utility.c:1074
#13 0x084f3c5d in PortalRunUtility (portal=portal(at)entry=0x8dae354, pstmt=pstmt(at)entry=0x8d5d614, isTopLevel=isTopLevel(at)entry=true, setHoldSnapshot=setHoldSnapshot(at)entry=false, dest=0x8d5d804, qc=0xffd43580) at pquery.c:1158
#14 0x084f3dd5 in PortalRunMulti (portal=0x8dae354, portal(at)entry=0x8d5d804, isTopLevel=isTopLevel(at)entry=true, setHoldSnapshot=setHoldSnapshot(at)entry=false, dest=dest(at)entry=0x8d5d804, altdest=altdest(at)entry=0x8d5d804, qc=qc(at)entry=0xffd43580) at pquery.c:1322
#15 0x084f4710 in PortalRun (portal=portal(at)entry=0x8dae354, count=count(at)entry=2147483647, isTopLevel=isTopLevel(at)entry=true, run_once=run_once(at)entry=true, dest=0x8d5d804, altdest=0x8d5d804, qc=qc(at)entry=0xffd43580) at pquery.c:791
#16 0x084ef82f in exec_simple_query (query_string=query_string(at)entry=0x8d5ca54 "ALTER TABLE parted_fk_naming ATTACH PARTITION parted_fk_naming_1 FOR VALUES IN ('1');") at postgres.c:1235
#17 0x084f0fd7 in PostgresMain (dbname=0x8d83ad4 "regression", username=0x8d5a758 "postgres") at postgres.c:4497
#18 0x080f7de2 in BackendRun (port=<optimized out>) at postmaster.c:4486
#19 BackendStartup (port=0x8d7bd78) at postmaster.c:4214
#20 ServerLoop () at postmaster.c:1804
#21 0x0844dc7c in PostmasterMain (argc=argc(at)entry=8, argv=argv(at)entry=0x8d58668) at postmaster.c:1476
#22 0x080faa8f in main (argc=8, argv=0x8d58668) at main.c:197

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2022-09-08 20:32:14 Re: pgsql: Fix perltidy breaking perlcritic
Previous Message Peter Geoghegan 2022-09-08 17:31:01 pgsql: Instrument freezing in autovacuum log reports.