Re: [HACKERS] crash on new system views
Re: [HACKERS] crash on new system views
От:
Keith Parks <emkxp01@mtcc.demon.co.uk>
Дата:
Bruce Momjian > > This query crashes the backend. pg_rules is a new system view: > > BEGIN WORK; > DECLARE c_matches BINARY CURSOR FOR > SELECT count(*) > FROM pg_attrdef t1, pg_rules t2 > WHERE t1.adrelid = t2.oid > END WORK; > > Partial backtrace is below. It is crashing in the optimizer. Bruce, I'm getting the same here when testing your query. The odd (maybe not?) thing is that views appear to have a NULL oid for all tuples. postgres=> select oid,usename from pg_user; oid|usename ---+-------- |postgres ^^^ Thinking about it, a view would not actually have an OID for each tuple as it's not a real table. It also crashed without the BEGIN or DECLARE ... postgres=> SELECT count(*) FROM pg_attrdef t1, pg_rules t2 WHERE t1.adrelid = t2.oid; pqReadData() -- backend closed the channel unexpectedly. As usual I have no idea where to look for the problem!! Keith.
Re: [HACKERS] crash on new system views
От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> Bruce Momjian > > > > > This query crashes the backend. pg_rules is a new system view: > > > > BEGIN WORK; > > DECLARE c_matches BINARY CURSOR FOR > > SELECT count(*) > > FROM pg_attrdef t1, pg_rules t2 > > WHERE t1.adrelid = t2.oid > > END WORK; > > > > Partial backtrace is below. It is crashing in the optimizer. > > Bruce, > > I'm getting the same here when testing your query. > > The odd (maybe not?) thing is that views appear to have > a NULL oid for all tuples. This has always been the case. Views don't have oid. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 http://www.op.net/~candle | (610) 353-9879(w) + If your life is a hard drive, | (610) 853-3000(h) + Christ can be your backup. |