473,882 Members | 1,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2882
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'::regc lass;
and
select pg_get_viewdef( 'pg_user'::regc lass);

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*******@postg resql.org

Nov 12 '05 #4


select * from pg_rewrite where ev_class = 'pg_user'::regc lass 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" "usecreated b"
"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" "usecreated b" "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" "usecreated b" "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 :ressortgroupre f 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
:ressortgroupre f 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 :ressortgroupre f 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
:ressortgroupre f 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 :ressortgroupre f 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
:ressortgroupre f 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 :ressortgroupre f
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 :ressortgroupre f 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 <>
:resultRelation s ()})
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'::regc lass;
and
select pg_get_viewdef( 'pg_user'::regc lass);

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'::regc lass 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*******@postg resql.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'::regc lass 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'::re gclass);
ERROR: nodeRead: did not find '}' at end of plan node
template1=> select pg_get_viewdef( 'pg_indexes'::r egclass);
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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 12 '05 #7
Andrei Ivanov <an***********@ ines.ro> writes:
template1=> select pg_get_viewdef( 'pg_tables'::re gclass);
ERROR: nodeRead: did not find '}' at end of plan node
template1=> select pg_get_viewdef( 'pg_indexes'::r egclass);
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'::re gclass);
ERROR: nodeRead: did not find '}' at end of plan node
template1=> select pg_get_viewdef( 'pg_indexes'::r egclass);
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 YourEmailAddres sHere" to ma*******@postg resql.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 YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 12 '05 #10

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

Similar topics

0
1367
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 Welcome to psql 7.3.4, the PostgreSQL interactive terminal. Type: \copyright for distribution terms
1
485
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 Welcome to psql 7.3.4, the PostgreSQL interactive terminal. Type: \copyright for distribution terms
10
1856
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 = (state.cam1x - x1) - (state.cam2x - x2); dX = 0.5 * ((state.cam1x - x1) + (state.cam2x - x2));
13
1857
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 mistake? Thanks Khoon /* Roots of a Quadratic Equation. 12.10.05 */ #include <stdio.h>
38
2569
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 my scanf ("%c",&q); On input 3 4 1 (for a,b and c) I had real roots OK On input 1 8 16 I had same real roots OK. However on 4 2 5, (for imaginary roots ) the computer cannot see the scanf ("%c",&q); statement. It just jumps...
1
1371
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 following error: ERROR: nodeRead: did not find '}' at end of plan node
10
3797
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 where the number of ways of failure (pFal) is calculated Both errors happen in the code section x1 = Draw - MatchesReq x2 = Field - Selections For Counter = 1 To (Draw - MatchesReq - 1) x1 = x1 * (Draw - MatchesReq - Counter)
2
1940
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 vector<string>. From that it selects a random word 6 letters or more long. That is the word of the game - the one to make all the anagrams from. After it selects a word, I initialize two more vector<string>'s - unplayed_anagrams and played_anagrams. I want...
3
2764
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" //TSP问题的解法 #include<stdlib.h>
8
1181
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 #include<stdio.h> #include<math.h> int distance {
0
9931
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we抣l explore What is ONU, What Is Router, ONU & Router抯 main usage, and What is the difference between ONU and Router. Let抯 take a closer look ! Part I. Meaning of...
0
9776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11105
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10827
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10403
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7113
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4599
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.