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

Lists: pgsql-committerspgsql-hackers
From: petere(at)postgresql(dot)org (Peter Eisentraut)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Date: 2008-12-19 16:25:20
Message-ID: 20081219162520.0CF0D7563FE@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
SQL/MED catalog manipulation facilities

This doesn't do any remote or external things yet, but it gives modules
like plproxy and dblink a standardized and future-proof system for
managing their connection information.

Martin Pihlak and Peter Eisentraut

Modified Files:
--------------
pgsql/doc/src/sgml:
catalogs.sgml (r2.184 -> r2.185)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/catalogs.sgml?r1=2.184&r2=2.185)
features.sgml (r2.29 -> r2.30)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/features.sgml?r1=2.29&r2=2.30)
func.sgml (r1.462 -> r1.463)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/func.sgml?r1=1.462&r2=1.463)
information_schema.sgml (r1.35 -> r1.36)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/information_schema.sgml?r1=1.35&r2=1.36)
keywords.sgml (r2.21 -> r2.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/keywords.sgml?r1=2.21&r2=2.22)
reference.sgml (r1.66 -> r1.67)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/reference.sgml?r1=1.66&r2=1.67)
pgsql/doc/src/sgml/ref:
allfiles.sgml (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/allfiles.sgml?r1=1.73&r2=1.74)
grant.sgml (r1.72 -> r1.73)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/grant.sgml?r1=1.72&r2=1.73)
psql-ref.sgml (r1.213 -> r1.214)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/psql-ref.sgml?r1=1.213&r2=1.214)
revoke.sgml (r1.49 -> r1.50)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/revoke.sgml?r1=1.49&r2=1.50)
pgsql/src:
Makefile (r1.43 -> r1.44)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/Makefile?r1=1.43&r2=1.44)
pgsql/src/backend:
Makefile (r1.130 -> r1.131)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/Makefile?r1=1.130&r2=1.131)
pgsql/src/backend/catalog:
Makefile (r1.67 -> r1.68)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/Makefile?r1=1.67&r2=1.68)
aclchk.c (r1.149 -> r1.150)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/aclchk.c?r1=1.149&r2=1.150)
dependency.c (r1.82 -> r1.83)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/dependency.c?r1=1.82&r2=1.83)
information_schema.sql (r1.46 -> r1.47)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/information_schema.sql?r1=1.46&r2=1.47)
sql_features.txt (r1.36 -> r1.37)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/sql_features.txt?r1=1.36&r2=1.37)
system_views.sql (r1.56 -> r1.57)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/system_views.sql?r1=1.56&r2=1.57)
pgsql/src/backend/commands:
Makefile (r1.38 -> r1.39)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/Makefile?r1=1.38&r2=1.39)
alter.c (r1.29 -> r1.30)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/alter.c?r1=1.29&r2=1.30)
pgsql/src/backend/nodes:
copyfuncs.c (r1.415 -> r1.416)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/copyfuncs.c?r1=1.415&r2=1.416)
equalfuncs.c (r1.340 -> r1.341)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/equalfuncs.c?r1=1.340&r2=1.341)
makefuncs.c (r1.60 -> r1.61)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/makefuncs.c?r1=1.60&r2=1.61)
pgsql/src/backend/parser:
gram.y (r2.645 -> r2.646)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.645&r2=2.646)
keywords.c (r1.205 -> r1.206)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c?r1=1.205&r2=1.206)
pgsql/src/backend/tcop:
utility.c (r1.302 -> r1.303)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/utility.c?r1=1.302&r2=1.303)
pgsql/src/backend/utils/adt:
acl.c (r1.143 -> r1.144)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/acl.c?r1=1.143&r2=1.144)
pgsql/src/backend/utils/cache:
syscache.c (r1.117 -> r1.118)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/syscache.c?r1=1.117&r2=1.118)
pgsql/src/bin/pg_dump:
common.c (r1.104 -> r1.105)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/common.c?r1=1.104&r2=1.105)
dumputils.c (r1.41 -> r1.42)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/dumputils.c?r1=1.41&r2=1.42)
pg_backup_archiver.c (r1.158 -> r1.159)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_backup_archiver.c?r1=1.158&r2=1.159)
pg_dump.c (r1.508 -> r1.509)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c?r1=1.508&r2=1.509)
pg_dump.h (r1.143 -> r1.144)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.h?r1=1.143&r2=1.144)
pg_dump_sort.c (r1.21 -> r1.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump_sort.c?r1=1.21&r2=1.22)
pgsql/src/bin/psql:
command.c (r1.198 -> r1.199)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/command.c?r1=1.198&r2=1.199)
describe.c (r1.189 -> r1.190)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/describe.c?r1=1.189&r2=1.190)
describe.h (r1.35 -> r1.36)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/describe.h?r1=1.35&r2=1.36)
help.c (r1.131 -> r1.132)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/help.c?r1=1.131&r2=1.132)
tab-complete.c (r1.177 -> r1.178)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/tab-complete.c?r1=1.177&r2=1.178)
pgsql/src/include/catalog:
catversion.h (r1.511 -> r1.512)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.511&r2=1.512)
dependency.h (r1.36 -> r1.37)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/dependency.h?r1=1.36&r2=1.37)
indexing.h (r1.103 -> r1.104)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/indexing.h?r1=1.103&r2=1.104)
pg_proc.h (r1.531 -> r1.532)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h?r1=1.531&r2=1.532)
pgsql/src/include/commands:
defrem.h (r1.90 -> r1.91)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/commands/defrem.h?r1=1.90&r2=1.91)
pgsql/src/include/nodes:
makefuncs.h (r1.63 -> r1.64)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/makefuncs.h?r1=1.63&r2=1.64)
nodes.h (r1.215 -> r1.216)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/nodes.h?r1=1.215&r2=1.216)
parsenodes.h (r1.383 -> r1.384)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/parsenodes.h?r1=1.383&r2=1.384)
pgsql/src/include/utils:
acl.h (r1.104 -> r1.105)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/acl.h?r1=1.104&r2=1.105)
builtins.h (r1.327 -> r1.328)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/builtins.h?r1=1.327&r2=1.328)
syscache.h (r1.72 -> r1.73)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/syscache.h?r1=1.72&r2=1.73)
pgsql/src/test/regress:
parallel_schedule (r1.50 -> r1.51)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/parallel_schedule?r1=1.50&r2=1.51)
serial_schedule (r1.47 -> r1.48)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/serial_schedule?r1=1.47&r2=1.48)
pgsql/src/test/regress/expected:
rules.out (r1.144 -> r1.145)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/rules.out?r1=1.144&r2=1.145)
sanity_check.out (r1.37 -> r1.38)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/sanity_check.out?r1=1.37&r2=1.38)

Added Files:
-----------
pgsql/doc/src/sgml/ref:
alter_foreign_data_wrapper.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
alter_server.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_server.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
alter_user_mapping.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_user_mapping.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
create_foreign_data_wrapper.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_foreign_data_wrapper.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
create_server.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_server.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
create_user_mapping.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_user_mapping.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
drop_foreign_data_wrapper.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/drop_foreign_data_wrapper.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
drop_server.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/drop_server.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
drop_user_mapping.sgml (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/drop_user_mapping.sgml?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/backend/commands:
foreigncmds.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/foreigncmds.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/backend/foreign:
Makefile (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
foreign.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/foreign.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/backend/foreign/dummy:
Makefile (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/dummy/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
dummy_fdw.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/dummy/dummy_fdw.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/backend/foreign/postgresql:
Makefile (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/postgresql/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
postgresql_fdw.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/postgresql/postgresql_fdw.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/include/catalog:
pg_foreign_data_wrapper.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_foreign_data_wrapper.h?rev=1.1&content-type=text/x-cvsweb-markup)
pg_foreign_server.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_foreign_server.h?rev=1.1&content-type=text/x-cvsweb-markup)
pg_user_mapping.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_user_mapping.h?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/include/foreign:
foreign.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/foreign/foreign.h?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/test/regress/expected:
foreign_data.out (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/foreign_data.out?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/test/regress/sql:
foreign_data.sql (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/foreign_data.sql?rev=1.1&content-type=text/x-cvsweb-markup)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Date: 2008-12-20 04:39:25
Message-ID: 9864.1229747965@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

petere(at)postgresql(dot)org (Peter Eisentraut) writes:
> Log Message:
> -----------
> 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.)

The Windows MSVC machines are all pretty unhappy too, presumably because
you didn't even try to teach the MSVC build system about the newly added
shared libraries.

regards, tom lane


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
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


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
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 09:44:25
Message-ID: 494CBE79.9060904@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> petere(at)postgresql(dot)org (Peter Eisentraut) writes:
>> Log Message:
>> -----------
>> 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.)

Neither can I. All the non-Windows crashes in the buildfarm seem to be
on 64-bit machines, although not all 64-bit members crash.

The callers of transformGenericOptions-function in foreigncmds.c use
OidIsValid to check the return value of transformGenericOptions, but it
returns an array, not an Oid. I committed a fix for that, we'll see if
it heals the buildfarm.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
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 13:41:02
Message-ID: 20081220134102.GA4845@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Tom Lane wrote:
> petere(at)postgresql(dot)org (Peter Eisentraut) writes:
> > Log Message:
> > -----------
> > SQL/MED catalog manipulation facilities
>
> The buildfarm says this patch has got serious portability issues.

FWIW I recently learned that you can set MALLOC_PERTURB_ to a nonzero
value to cause glibc's malloc() to fill memory with the byte value
therein, and clear it with the bitwise inverse on free. This could be
helpful to find cases of uninitialized memory usage.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 15:27:30
Message-ID: 494D0EE2.4000209@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Heikki Linnakangas wrote:
> The callers of transformGenericOptions-function in foreigncmds.c use
> OidIsValid to check the return value of transformGenericOptions, but it
> returns an array, not an Oid. I committed a fix for that, we'll see if
> it heals the buildfarm.
>

Thanks for that. There was an additional use of the Datum as Oid in
AlterForeignDataWrapper, namely the assignment to repl_vals.

Another bug was uncovered on orca -- a missing semicolon in gram.y:3004

Fixes attached.

regards,
Martin

Attachment Content-Type Size
sql-med-fix.patch text/x-diff 1.4 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, 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 15:58:15
Message-ID: 18053.1229788695@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com> writes:
> Thanks for that. There was an additional use of the Datum as Oid in
> AlterForeignDataWrapper, namely the assignment to repl_vals.

Ah, I just finished rediscovering that myself.

> Another bug was uncovered on orca -- a missing semicolon in gram.y:3004

Yeah, newer bisons are pickier about that. Will apply.

regards, tom lane


From: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
To: PostgreSQL Hackers ML <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Date: 2008-12-28 23:32:01
Message-ID: 1230507121.18967.17.camel@laptop.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Hi,

On Fri, 2008-12-19 at 16:25 +0000, Peter Eisentraut wrote:
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/dummy/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
> dummy_fdw.c (r1.1)
>
> (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/foreign/postgresql/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
> postgresql_fdw.c (r1.1)

Err, to which (RPM) package should the dummy_fdw.so and
postgresql_fdw.so go? -server, or the regular package?

Regards,
--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
Cc: PostgreSQL Hackers ML <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Date: 2008-12-28 23:39:43
Message-ID: 17357.1230507583@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <devrim(at)gunduz(dot)org> writes:
> Err, to which (RPM) package should the dummy_fdw.so and
> postgresql_fdw.so go? -server, or the regular package?

-server, I'd say. They're of no value without the server installed,
for sure.

regards, tom lane


From: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers ML <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any
Date: 2008-12-28 23:43:31
Message-ID: 1230507811.18967.19.camel@laptop.gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Sun, 2008-12-28 at 18:39 -0500, Tom Lane wrote:
> > Err, to which (RPM) package should the dummy_fdw.so and
> > postgresql_fdw.so go? -server, or the regular package?
>
> -server, I'd say. They're of no value without the server installed,
> for sure.

Thanks Tom.

Regards,
--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org