Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any

From: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Date: 2008-12-20 07:34:22
Message-ID: alpine.LRH.1.10.0812201022430.29837@lnfm1.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi,

On Fri, 19 Dec 2008, Tom Lane wrote:

>> SQL/MED catalog manipulation facilities
>
> The buildfarm says this patch has got serious portability issues.
>
> grebe, dugong, and ermine are all crashing here:
>
> --- 109,115 ----
> (3 rows)
>
> ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');
> ! server closed the connection unexpectedly
> ! This probably means the server terminated abnormally
> ! before or while processing the request.
> ! connection to server was lost
>
> (Unfortunately I can't reproduce this on any of my own machines.)

Here is the gdb backtrace from dugong:
-------------------
Core was generated by ostgres: math regression [local] ALTER FOREIGN DATA WRAPPER '.
Program terminated with signal 11, Segmentation fault.
#0 0x40000000000560b0 in heap_compute_data_size (
tupleDesc=0x200000000287fbb8, values=0x60000000001ae060,
isnull=0x60000000001ae0b8 "") at heaptuple.c:103
103 if (ATT_IS_PACKABLE(att[i]) &&
(gdb) bt
#0 0x40000000000560b0 in heap_compute_data_size (
tupleDesc=0x200000000287fbb8, values=0x60000000001ae060,
isnull=0x60000000001ae0b8 "") at heaptuple.c:103
#1 0x400000000005cac0 in heap_form_tuple (tupleDescriptor=0x200000000287fbb8,
values=0x60000000001ae060, isnull=0x60000000001ae0b8 "") at heaptuple.c:728
#2 0x400000000005d700 in heap_modify_tuple (tuple=0x600000000019e9f8,
tupleDesc=0x200000000287fbb8, replValues=0x60000fffffb2e318,
replIsnull=0x60000fffffb2e340 "", doReplace=0x60000fffffb2e345 "")
at heaptuple.c:853
#3 0x4000000000399480 in AlterForeignDataWrapper (stmt=0x6000000000160e78)
at foreigncmds.c:480
#4 0x40000000007b6bc0 in ProcessUtility (parsetree=0x6000000000160e78,
queryString=0x60000000001603b8 "ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');", params=0x0, isTopLevel=1 '\001', dest=0x6000000000160f10,
completionTag=0x60000fffffb2e96e "") at utility.c:469
#5 0x40000000007b2e20 in PortalRunUtility (portal=0x60000000001a5fc8,
utilityStmt=0x6000000000160e78, isTopLevel=1 '\001',
dest=0x6000000000160f10, completionTag=0x60000fffffb2e96e "")
at pquery.c:1183
#6 0x40000000007b3380 in PortalRunMulti (portal=0x60000000001a5fc8,
isTopLevel=1 '\001', dest=0x6000000000160f10, altdest=0x6000000000160f10,
completionTag=0x60000fffffb2e96e "") at pquery.c:1286
#7 0x40000000007b1150 in PortalRun (portal=0x60000000001a5fc8,
count=9223372036854775807, isTopLevel=1 '\001', dest=0x6000000000160f10,
---Type <return> to continue, or q <return> to quit---
altdest=0x6000000000160f10, completionTag=0x60000fffffb2e96e "")
at pquery.c:815
#8 0x400000000079eed0 in exec_simple_query (
query_string=0x60000000001603b8 "ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');") at postgres.c:991
#9 0x40000000007ab570 in PostgresMain (argc=6, argv=0x60000000000c2ab0,
username=0x60000000000c2800 "math") at postgres.c:3600
#10 0x40000000006dadb0 in BackendRun (port=0x60000000000e3d40)
at postmaster.c:3258
#11 0x40000000006d8de0 in BackendStartup (port=0x60000000000e3d40)
at postmaster.c:2872
#12 0x40000000006d1700 in ServerLoop () at postmaster.c:1283
#13 0x40000000006d0480 in PostmasterMain (argc=6, argv=0x60000000000c0d20)
at postmaster.c:1031
#14 0x4000000000533e50 in main (argc=6, argv=0x60000000000c0d20) at main.c:188
(gdb)
------------------------

And the full backtrace if needed:

---------------
(gdb) bt full
#0 0x40000000000560b0 in heap_compute_data_size (
tupleDesc=0x200000000287fbb8, values=0x60000000001ae060,
isnull=0x60000000001ae0b8 "") at heaptuple.c:103
val = 1761288
data_length = 78
i = 4
numberOfAttributes = 5
att = (Form_pg_attribute *) 0x200000000287fbe0
#1 0x400000000005cac0 in heap_form_tuple (tupleDescriptor=0x200000000287fbb8,
values=0x60000000001ae060, isnull=0x60000000001ae0b8 "") at heaptuple.c:728
tuple = (HeapTuple) 0x60000000001adfd0
td = (HeapTupleHeader) 0x60000000001ae0a0
len = 32
data_len = 8
hoff = 32
hasnull = 1 '\001'
att = (Form_pg_attribute *) 0x200000000287fbe0
numberOfAttributes = 5
i = 5
__func__ = "heap_form_tuple"
#2 0x400000000005d700 in heap_modify_tuple (tuple=0x600000000019e9f8,
tupleDesc=0x200000000287fbb8, replValues=0x60000fffffb2e318,
replIsnull=0x60000fffffb2e340 "", doReplace=0x60000fffffb2e345 "")
at heaptuple.c:853
---Type <return> to continue, or q <return> to quit---
numberOfAttributes = 5
attoff = 5
values = (Datum *) 0x60000000001ae060
isnull = (bool *) 0x60000000001ae0b8 ""
newTuple = (HeapTuple) 0x91800195972
#3 0x4000000000399480 in AlterForeignDataWrapper (stmt=0x6000000000160e78)
at foreigncmds.c:480
rel = (Relation) 0x200000000287f908
tp = (HeapTuple) 0x600000000019e9f8
repl_val = {0, 0, 0, 0, 1761288}
repl_null = "\000\000\000\000"
repl_repl = "\000\000\000\000\001"
fdwId = 28313
isnull = 1 '\001'
datum = 6917529027642843144
fdwlib = (ForeignDataWrapperLibrary *) 0x600000000016d7f0
__func__ = "AlterForeignDataWrapper"
#4 0x40000000007b6bc0 in ProcessUtility (parsetree=0x6000000000160e78,
queryString=0x60000000001603b8 "ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');", params=0x0, isTopLevel=1 '\001', dest=0x6000000000160f10,
completionTag=0x60000fffffb2e96e "") at utility.c:469
__func__ = "ProcessUtility"
#5 0x40000000007b2e20 in PortalRunUtility (portal=0x60000000001a5fc8,
utilityStmt=0x6000000000160e78, isTopLevel=1 '\001',
---Type <return> to continue, or q <return> to quit---
dest=0x6000000000160f10, completionTag=0x60000fffffb2e96e "")
at pquery.c:1183
active_snapshot_set = 1 '\001'
__func__ = "PortalRunUtility"
#6 0x40000000007b3380 in PortalRunMulti (portal=0x60000000001a5fc8,
isTopLevel=1 '\001', dest=0x6000000000160f10, altdest=0x6000000000160f10,
completionTag=0x60000fffffb2e96e "") at pquery.c:1286
stmt = (Node *) 0x6000000000160e78
stmtlist_item = (ListCell *) 0x6000000000161120
#7 0x40000000007b1150 in PortalRun (portal=0x60000000001a5fc8,
count=9223372036854775807, isTopLevel=1 '\001', dest=0x6000000000160f10,
altdest=0x6000000000160f10, completionTag=0x60000fffffb2e96e "")
at pquery.c:815
save_exception_stack = (sigjmp_buf *) 0x60000fffffb2eac0
save_context_stack = (ErrorContextCallback *) 0x0
local_sigjmp_buf = {{__jmpbuf = {6917546619822073200,
2305843009217053184, 0, 2674341019140927, 0, 0, 0, 0,
4611686018435452112, 0, 0, 0, 0, 0, -4611686018427386609, 0, 5832769,
6917537823729074712, 0, 6917546619822073296, 0 <repeats 44 times>, 63,
4611686018440740537, 6917529027641081860, 209, 0, 4611686018440740536},
__mask_was_saved = 0, __saved_mask = {__val = {6917529027642472976,
6917529027641081861, 4611686018440948192, 6917529027641081856,
6917529027642472976, 6917529027641081860, 6917529027642527480, 0,
6917529027642022104, 6917529027642022104, 80, 6917529027642527504,
---Type <return> to continue, or q <return> to quit---
4611686018440740536, 6917529027642527584, 80, 6917529027641081856}}}}
result = 0 '\0'
saveTopTransactionResourceOwner = (ResourceOwner) 0x60000000001855d8
saveTopTransactionContext = (MemoryContext) 0x60000000000e59f0
saveActivePortal = (Portal) 0x0
saveResourceOwner = (ResourceOwner) 0x60000000001855d8
savePortalContext = (MemoryContext) 0x0
saveMemoryContext = (MemoryContext) 0x60000000000e59f0
__func__ = "PortalRun"
#8 0x400000000079eed0 in exec_simple_query (
query_string=0x60000000001603b8 "ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');") at postgres.c:991
parsetree = (Node *) 0x6000000000160e78
portal = (Portal) 0x60000000001a5fc8
snapshot_set = 0 '\0'
commandTag = 0x4000000000cbe750 "ALTER FOREIGN DATA WRAPPER"
completionTag = "\000\000Q\000\000\000\000\000\000`\234\002\000\000\000\000\003\026\000\000\000\000000\000\000\000\000\000\000?\003\026\000\000\000\000\000\000\000\017\000\000\0006\000\000\000s\001\001\000?\003\026\000\000"
querytree_list = (List *) 0x60000000001610e8
plantree_list = (List *) 0x6000000000161148
receiver = (DestReceiver *) 0x6000000000160f10
format = 0
dest = DestRemote
---Type <return> to continue, or q <return> to quit---
oldcontext = (MemoryContext) 0x60000000000e59f0
parsetree_list = (List *) 0x6000000000160ed8
parsetree_item = (ListCell *) 0x6000000000160eb0
save_log_statement_stats = 0 '\0'
was_logged = 0 '\0'
isTopLevel = 1 '\001'
msec_str = "\000\000\000000\000\000\000\000\000\000\003\026\000\000\000\000000\000\000\000\017\000000\000\000"
__func__ = "exec_simple_query"
#9 0x40000000007ab570 in PostgresMain (argc=6, argv=0x60000000000c2ab0,
username=0x60000000000c2800 "math") at postgres.c:3600
query_string = 0x60000000001603b8 "ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');"
flag = -1
dbname = 0x60000000000e3450 "regression"
userDoption = 0x0
secure = 0 '\0'
errs = 0
debug_flag = -1
guc_names = (List *) 0x0
guc_values = (List *) 0x0
ctx = PGC_SUSET
gucsource = PGC_S_CLIENT
am_superuser = 1 '\001'
---Type <return> to continue, or q <return> to quit---
firstchar = 81
stack_base = 0 '\0'
input_message = {
data = 0x60000000001603b8 "ALTER FOREIGN DATA WRAPPER foo OPTIONS (a '1', b '2');", len = 55, maxlen = 1024, cursor = 55}
local_sigjmp_buf = {{__jmpbuf = {6917546619822074288,
2305843009217053184, 0, 2674341019124543, 0, 0, 0, 0,
4611686018435427728, 0, 0, 0, 0, 0, -4611686018427386867, 0, 5832769,
6917537823729074568, 0, 6917546619822074560, 0 <repeats 40 times>,
6917546619822075412, 6917546619822075420, 6917546619822075443,
6917546619822075412, 6917546619822075443, 0, 0, 0, 0, 0},
__mask_was_saved = 1, __saved_mask = {__val = {18446744066192964099,
6917529027641081856, 0, 6917529027641899184, 352, 512,
6917529027641898808, 58, 6752, 8144, 6917529027641899344, 5,
6917529027641873152, 81604378636, 0, 6917529027641081861}}}}
send_ready_for_query = 0 '\0'
__func__ = "PostgresMain"
#10 0x40000000006dadb0 in BackendRun (port=0x60000000000e3d40)
at postmaster.c:3258
av = (char **) 0x60000000000c2ab0
maxac = 27
ac = 6
secs = 283072531
usecs = 545137
---Type <return> to continue, or q <return> to quit---
protobuf = "-v196608\000\000\000@ (\f\000\000\000\000000(\f\000\000\000\000?\000\000"
i = 6
__func__ = "BackendRun"
#11 0x40000000006d8de0 in BackendStartup (port=0x60000000000e3d40)
at postmaster.c:2872
bn = (Backend *) 0x60000000000e3410
pid = 0
__func__ = "BackendStartup"
#12 0x40000000006d1700 in ServerLoop () at postmaster.c:1283
port = (Port *) 0x60000000000e3d40
i = 0
rmask = {fds_bits = {16, 0 <repeats 15 times>}}
selres = 1
readmask = {fds_bits = {16, 0 <repeats 15 times>}}
nSockets = 5
now = 1229757331
last_touch_time = 1229757314
__func__ = "ServerLoop"
#13 0x40000000006d0480 in PostmasterMain (argc=6, argv=0x60000000000c0d20)
at postmaster.c:1031
opt = -1
status = 0
userDoption = 0x60000000000c0e00 "/home/math/pgsql_cvs/pgsql/src/test/re---Type <return> to continue, or q <return> to quit---
gress/./tmp_check/data"
i = 64
__func__ = "PostmasterMain"
#14 0x4000000000533e50 in main (argc=6, argv=0x60000000000c0d20) at main.c:188
No locals.

-----------------

Regards,
Sergey

*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math(at)sai(dot)msu(dot)ru

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-12-20 09:40:56 pgsql: Don't use OidIsValid to check the return value of
Previous Message Tom Lane 2008-12-20 04:39:25 Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-12-20 08:13:34 Re: Is "Window" really safe as a global typedef name?
Previous Message Heikki Linnakangas 2008-12-20 07:25:27 Re: Hot standby and b-tree killed items