472,358 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,358 software developers and data experts.

ERROR: nodeRead: did not find '}' [x2]



Hello,
it seems my postgresql data has somehow become corrupted (by a forced
shutdown I think):

psql template1 -U shadow
Password:
ERROR: nodeRead: did not find '}' at end of plan node
Welcome to psql 7.3.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

template1=> \d
ERROR: current transaction is aborted, queries ignored until end of
transaction block
template1=> abort;
ROLLBACK
template1=> \d
ERROR: nodeRead: did not find '}' at end of plan node

Every command that tries to access a table gives this error...
pg_dumpall says:

pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: nodeRead: did not find '}' at
end of plan node
pg_dump: The command was: select (select usename from pg_user where
usesysid = datdba) as dba, encoding, datpath from pg_database where
datname = 'cinema'
pg_dumpall: pg_dump failed on cinema, exiting
What can I do ?

(postgresql 7.3.4 on a gentoo linux box, with psql from the same package)

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #1
10 2700
Andrei Ivanov <an***********@ines.ro> writes:
it seems my postgresql data has somehow become corrupted (by a forced
shutdown I think): psql template1 -U shadow
Password:
ERROR: nodeRead: did not find '}' at end of plan node
and
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: nodeRead: did not find '}' at
end of plan node
pg_dump: The command was: select (select usename from pg_user where
usesysid = datdba) as dba, encoding, datpath from pg_database where
datname = 'cinema'
pg_dumpall: pg_dump failed on cinema, exiting


These both look like the pg_user view is corrupted.

It seems hard to believe that identical corruption could have affected
two databases at once. Do you see this same problem with all your
databases (if you have any more than template1 and cinema)? If so,
I wonder whether the postgres executable got corrupted --- it'd not be
very common for a system failure to corrupt files that aren't being
modified, but perhaps it could happen. If it is that, you could fix it
with a quick reinstall of the RPM.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #2

I've reinstalled postgres, but the same errors happen.
I've tried connection to more databases, but the error show everytime.

psql -U shadow dc
Password:
ERROR: nodeRead: did not find '}' at end of plan node
Welcome to psql 7.3.4, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

dc=> \dt
ERROR: current transaction is aborted, queries ignored until end of
transaction block
dc=>

???

This is the log from when the forced system shutdown happened:

LOG: pq_recvbuf: unexpected EOF on client connection
LOG: pq_recvbuf: unexpected EOF on client connection
LOG: pq_recvbuf: unexpected EOF on client connection
LOG: fast shutdown request
LOG: shutting down
LOG: database system is shut down
LOG: database system was shut down at 2003-11-06 23:21:03 EET
LOG: checkpoint record is at 0/7CDAC94
LOG: redo record is at 0/7CDAC94; undo record is at 0/0; shutdown TRUE
LOG: next transaction id: 115743; next oid: 205535
LOG: database system is ready
LOG: database system was interrupted at 2003-11-06 23:21:05 EET
LOG: checkpoint record is at 0/7CDAC94
LOG: redo record is at 0/7CDAC94; undo record is at 0/0; shutdown TRUE
LOG: next transaction id: 115743; next oid: 205535
LOG: database system was not properly shut down; automatic recovery in
progress
LOG: ReadRecord: record with zero length at 0/7CDACD4
LOG: redo is not required
LOG: database system is ready
On Thu, 20 Nov 2003, Tom Lane wrote:
Andrei Ivanov <an***********@ines.ro> writes:
it seems my postgresql data has somehow become corrupted (by a forced
shutdown I think):

psql template1 -U shadow
Password:
ERROR: nodeRead: did not find '}' at end of plan node


and
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: nodeRead: did not find '}' at
end of plan node
pg_dump: The command was: select (select usename from pg_user where
usesysid = datdba) as dba, encoding, datpath from pg_database where
datname = 'cinema'
pg_dumpall: pg_dump failed on cinema, exiting


These both look like the pg_user view is corrupted.

It seems hard to believe that identical corruption could have affected
two databases at once. Do you see this same problem with all your
databases (if you have any more than template1 and cinema)? If so,
I wonder whether the postgres executable got corrupted --- it'd not be
very common for a system failure to corrupt files that aren't being
modified, but perhaps it could happen. If it is that, you could fix it
with a quick reinstall of the RPM.

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #3
Andrei Ivanov <an***********@ines.ro> writes:
I've reinstalled postgres, but the same errors happen.
I've tried connection to more databases, but the error show everytime.


Hm, that's very odd. Could we see the results of

select * from pg_rewrite where ev_class = 'pg_user'::regclass;
and
select pg_get_viewdef('pg_user'::regclass);

You'll probably need to do a "rollback" to get psql out of its
transaction-aborted state after startup, but then I'd expect the
first of these to work. The second will likely fail, but we should
confirm that ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #4


select * from pg_rewrite where ev_class = 'pg_user'::regclass gives
(extended display):

rulename | _RETURN
ev_class | 16681
ev_attr | -1
ev_type | 1
is_instead | t
ev_qual | <>
ev_action | ({ QUERY :command 1 :source 0 :utility <> :resultRelation 0
:into <> :isPortal false :isBinary false :hasAggs false :hasSubLinks false
:rtable ({ RTE :alias { ALIAS :aliasname *OLD* :colnames <>} :eref { ALIAS
:aliasname *OLD* :colnames ( "usename" "usesysid" "usecreatedb"
"usesuper" "usecatupd" "passwd" "valuntil" "useconfig" )} :rtekind
0 :relid 16681 :inh false :inFromCl false :checkForRead false
:checkForWrite false :checkAsUser 1} { RTE :alias { ALIAS :aliasname *NEW*
:colnames <>} :eref { ALIAS :aliasname *NEW* :colnames ( "usename"
"usesysid" "usecreatedb" "usesuper" "usecatupd" "passwd"
"valuntil" "useconfig" )} :rtekind 0 :relid 16681 :inh false :inFromCl
false :checkForRead false :checkForWrite false :checkAsUser 1} { RTE
:alias <> :eref { ALIAS :aliasname pg_shadow :colnames ( "usename"
"usesysid" "usecreatedb" "usesuper" "usecatupd" "passwd"
"valuntil" "useconfig" )} :rtekind 0 :relid 1260 :inh true :inFromCl
true :checkForRead true :checkForWrite false :checkAsUser 1}) :jointree {
FROMEXPR :fromlist ({ RANGETBLREF 3 }) :quals <>} :rowMarks () :targetList
({ TARGETENTRY :resdom { RESDOM :resno 1 :restype 19 :restypmod -1
:resname usename :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false }
:expr { VAR :varno 3 :varattno 1 :vartype 19 :vartypmod -1 :varlevelsup 0
:varnoold 3 :varoattno 1}} { TARGETENTRY :resdom { RESDOM :resno 2
:restype 23 :restypmod -1 :resname usesysid :reskey 0 :reskeyop 0
:ressortgroupref 0 :resjunk false } :expr { VAR :varno 3 :varattno 2
:vartype 23 :vartypmod -1 :varlevelsup 0 :varnoold 3 :varoattno 2}} {
TARGETENTRY :resdom { RESDOM :resno 3 :restype 16 :restypmod -1 :resname
usecreatedb :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false }
:expr { VAR :varno 3 :varattno 3 :vartype 16 :vartypmod -1 :varlevelsup 0
:varnoold 3 :varoattno 3}} { TARGETENTRY :resdom { RESDOM :resno 4
:restype 16 :restypmod -1 :resname usesuper :reskey 0 :reskeyop 0
:ressortgroupref 0 :resjunk false } :expr { VAR :varno 3 :varattno 4
:vartype 16 :vartypmod -1 :varlevelsup 0 :varnoold 3 :varoattno 4}} {
TARGETENTRY :resdom { RESDOM :resno 5 :restype 16 :restypmod -1 :resname
usecatupd :reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr
{ VAR :varno 3 :varattno 5 :vartype 16 :vartypmod -1 :varlevelsup 0
:varnoold 3 :varoattno 5}} { TARGETENTRY :resdom { RESDOM :resno 6
:restype 25 :restypmod -1 :resname passwd :reskey 0 :reskeyop 0
:ressortgroupref 0 :resjunk false } :expr { CONST :consttype 25 :constlen
-1 :constbyval false :constisnull false :constvalue 12 [ 12 0 0 0 42 42
42 42 42 42 42 42 ] }} { TARGETENTRY :resdom { RESDOM :resno 7 :restype
702 :restypmod -1 :resname valuntil :reskey 0 :reskeyop 0 :ressortgroupref
0 :resjunk false } :expr { VAR :varno 3 :varattno 7 :vartype 702
:vartypmod -1 :varlevelsup 0 :varnoold 3 :varoattno 7}} { TARGETENTRY
:resdom { RESDOM :resno 8 :restype 1009 :restypmod -1 :resname useconfig
:reskey 0 :reskeyop 0 :ressortgroupref 0 :resjunk false } :expr { VAR
:varno 3 :varattno 8 :vartype 1009 :vartypmod -1 :varlevelsup 0 :varnoold
3 :varoattno 8}}) :groupClause <> :havingQual <> :distinctClause <>
:sortClause <> :limitOffset <> :limitCount <> :setOperations <>
:resultRelations ()})
The second query indeed fails...
On Thu, 20 Nov 2003, Tom Lane wrote:
Andrei Ivanov <an***********@ines.ro> writes:
I've reinstalled postgres, but the same errors happen.
I've tried connection to more databases, but the error show everytime.


Hm, that's very odd. Could we see the results of

select * from pg_rewrite where ev_class = 'pg_user'::regclass;
and
select pg_get_viewdef('pg_user'::regclass);

You'll probably need to do a "rollback" to get psql out of its
transaction-aborted state after startup, but then I'd expect the
first of these to work. The second will likely fail, but we should
confirm that ...

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #5
Andrei Ivanov <an***********@ines.ro> writes:
select * from pg_rewrite where ev_class = 'pg_user'::regclass gives
[ lots of cruft ]


Well, that's interesting, because I get exactly the same data from my
perfectly-functional 7.3.4 installation.

I think there must be some incompatibility between your data directory
and your Postgres executable, but it's hard to think what. Have you
verified that your executable really is 7.3.4 (try "select version()")?

I suppose it could also be that the problem is not in pg_user after all,
but some other view. I didn't think pg_get_viewdef() would use any
other views, but I might be mistaken. Can you successfully do
pg_get_viewdef on any other views --- pg_tables or pg_indexes for
example?

Also, how did you get into this state, exactly? I cannot believe that
it's a matter of a forced shutdown; I think there must be some kind of
software compatibility issue involved. What system updates have you
done recently?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #6


On Thu, 20 Nov 2003, Tom Lane wrote:
Andrei Ivanov <an***********@ines.ro> writes:
select * from pg_rewrite where ev_class = 'pg_user'::regclass gives
[ lots of cruft ]
Well, that's interesting, because I get exactly the same data from my
perfectly-functional 7.3.4 installation.

I think there must be some incompatibility between your data directory
and your Postgres executable, but it's hard to think what. Have you
verified that your executable really is 7.3.4 (try "select version()")?


PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2
20031022 (Gentoo Linux 3.3.2-r2, propolice)

I suppose it could also be that the problem is not in pg_user after all,
but some other view. I didn't think pg_get_viewdef() would use any
other views, but I might be mistaken. Can you successfully do
pg_get_viewdef on any other views --- pg_tables or pg_indexes for
example?

template1=> select pg_get_viewdef('pg_tables'::regclass);
ERROR: nodeRead: did not find '}' at end of plan node
template1=> select pg_get_viewdef('pg_indexes'::regclass);
ERROR: nodeRead: did not find '}' at end of plan node
template1=>

Also, how did you get into this state, exactly? I cannot believe that
it's a matter of a forced shutdown; I think there must be some kind of
software compatibility issue involved. What system updates have you
done recently?

regards, tom lane


I really can't think of anything else that could have brought postgresql
in this state... (could on minor update to glibc cause this ? I don't
remember if updated glibc before or after the corruption...)
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #7
Andrei Ivanov <an***********@ines.ro> writes:
template1=> select pg_get_viewdef('pg_tables'::regclass);
ERROR: nodeRead: did not find '}' at end of plan node
template1=> select pg_get_viewdef('pg_indexes'::regclass);
ERROR: nodeRead: did not find '}' at end of plan node
Bizarre. I just checked, and this query will not result in trying to
open any views other than the one named by the get_viewdef argument.
So it sure appears that reading any view rule will cause the failure.
I really can't think of anything else that could have brought postgresql
in this state... (could on minor update to glibc cause this ? I don't
remember if updated glibc before or after the corruption...)


Doesn't seem real likely to me either ... but we seem to have eliminated
all the other possibilities. The data in the database doesn't appear to
be corrupted, and you already tried reinstalling Postgres, so the
executable file isn't corrupted, which seems to leave the libraries.
Are you in a position to back out the glibc update and see what happens?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #8

I'd rather not downgrade glibc because of some bad experience with it...

Any way, I've installed the same version of postgresql on another computer
and copied the data directory the, and, surprise, no errors...

I've managed to dump my data, and now, off I go to update to postgres
7.4...

Thanks for your help, although this remains a mistery...

On Fri, 21 Nov 2003, Tom Lane wrote:
Andrei Ivanov <an***********@ines.ro> writes:
template1=> select pg_get_viewdef('pg_tables'::regclass);
ERROR: nodeRead: did not find '}' at end of plan node
template1=> select pg_get_viewdef('pg_indexes'::regclass);
ERROR: nodeRead: did not find '}' at end of plan node


Bizarre. I just checked, and this query will not result in trying to
open any views other than the one named by the get_viewdef argument.
So it sure appears that reading any view rule will cause the failure.
I really can't think of anything else that could have brought postgresql
in this state... (could on minor update to glibc cause this ? I don't
remember if updated glibc before or after the corruption...)


Doesn't seem real likely to me either ... but we seem to have eliminated
all the other possibilities. The data in the database doesn't appear to
be corrupted, and you already tried reinstalling Postgres, so the
executable file isn't corrupted, which seems to leave the libraries.
Are you in a position to back out the glibc update and see what happens?

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #9
Andrei Ivanov <an***********@ines.ro> writes:
I'd rather not downgrade glibc because of some bad experience with it... Any way, I've installed the same version of postgresql on another computer
and copied the data directory the, and, surprise, no errors...


Sounds like the smoking gun to me, for sure.

Exactly which glibc version was this?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #10

On Fri, 21 Nov 2003, Tom Lane wrote:
Andrei Ivanov <an***********@ines.ro> writes:
I'd rather not downgrade glibc because of some bad experience with it...

Any way, I've installed the same version of postgresql on another computer
and copied the data directory the, and, surprise, no errors...


Sounds like the smoking gun to me, for sure.

Exactly which glibc version was this?


glibc-2.3.2-r9 (from gentoo, changelog snip: Update CVS branch to 20031115)

I've managed to import the dump in the new 7.4 version, and everything
seems to work smoothly... again, thanks for the help.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrei Ivanov | last post by:
Hello, it seems my postgresql data has somehow become corrupted (by a forced shutdown I think): psql template1 -U shadow Password: ERROR: nodeRead: did not find '}' at end of plan node...
1
by: Andrei Ivanov | last post by:
Hello, it seems my postgresql data has somehow become corrupted (by a forced shutdown I think): psql template1 -U shadow Password: ERROR: nodeRead: did not find '}' at end of plan node...
10
by: John | last post by:
Hi all... Either I'm doing really something really stupid - or maybe there is some bug somewhere (optimizing?). In a function I have: int x1, y1, x2, y2; float dR, dX, dY; dR =...
13
by: Red Dragon | last post by:
I am C programming student. My program here has an error message " illegal else without matching if " which I cannot figure out what is not matching. Can somebody please help. Where is the...
38
by: Red Dragon | last post by:
I am self study C student. I got stuck in the program below on quadratic equation and will be most grateful if someone could help me to unravel the mystery. Why does the computer refuse to execute...
1
by: Sven Eschenberg | last post by:
Hallo pgsql-general Fellas, First: I am not subscribed to the list, I will check back on the web though. When I try to connect to my databases (actually it'S true for two of them), I get the...
10
by: Lisa | last post by:
In translating the formula for calculating lottery odds for various conditions into a Visual Basic Program, I have apparently missed something in that I get errors in the part of the calculation...
2
by: theronnightstar | last post by:
I am writing an anagram program for my fiance. Figured it would be an excellent task to learn from. The way it is supposed to work is it reads in a word list from a file into a temporary...
3
by: Baby Lion | last post by:
hi,everyone , one Runtime error occur when running , maybe it's about assigning memory . I need your help , thanks. It's about the travelling sellman problem . //#include "stdafx.h" ...
8
by: kingsleyterrace | last post by:
Hi, i am new to programming and am having a little problem in running my program on Dev-C++.this is the codes i have used. i have also got 2 errors: invalid function declaration 1 ...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.