Re: [HACKERS] Rules: first fix - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Rules: first fix
Date
Msg-id 35F47B33.DC39D9FF@alumni.caltech.edu
Whole thread Raw
In response to Rules: first fix  (jwieck@debis.com (Jan Wieck))
List pgsql-hackers
> as proposed here comes the first patch for the query rewrite system.

Hi Jan. I'm having trouble with views on my Linux system. The symptom is
that there is a segfault as memory is getting free'd at the end of a
query. The pg_view, pg_rule, and pg_user tables are all inaccessible as
views, though the underlying query which defines the view does work.

Unfortunately, I don't have any insight into the view stuff, and the
segfault is happening after everything executes so is far away from
where the bad or replicated pointer must be. afaik the problem has been
present for a month or two (your rules patches were applied Aug 17, so
that might be when).

Do you have any suggestions on where to look? I assume that you do no
develop under Linux because other Linux boxes (Tatsuo's at least) show
the same symptoms. I'd like to clear this up (I know that you are
developing new patches for the rules system, but...) since we have at
least two separate problems in the backend now (views and apparently
indices) and we need to reduce the discrepencies between the various
platforms to make progress.

An additional clue might be that I can do

  select viewname from pg_view;

but not

  select description from pg_view;
or
  select * from pg_view;

Actually, there are three views in the system after the initdb, and the
only queries which result in a segfault are ones involving the "text"
fields. Of course, two of the three views have only two columns, one of
which is a text field, but it is suspicious; I can see all of the other
columns in pg_user except the passwd field, for example. I'll keep
poking at it.

btw, compiling with assert checking enabled does not catch the problem.

Regards.

                     - Tom

pgsql-hackers by date:

Previous
From: Stephen Davies
Date:
Subject: Re: [INTERFACES] Re: DELETE FROM TABLE doesn't work (AGAIN)
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] 6.4 Aggregate Bug and HAVING problems...