[HACKERS] pg_dump problem

2004-11-16 Thread Roberto Fichera
Hi All,
today I ve got this error during a backup:
[EMAIL PROTECTED] root]# pg_dump -U postgres radiuslog | gzip -c > 
radiuslog-20041116.gz
pg_dump: ERROR:  unknown address family (3)
pg_dump: lost synchronization with server, resetting connection
pg_dump: SQL command to dump the contents of table "radacct" failed: 
PQendcopy() failed.
pg_dump: Error message from server: pg_dump: The command was: COPY 
public.radacct (radacctid, acctsessionid, acctuniqueid, username, realm, 
nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, 
acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, 
acctinputoctets, acctoutputoctets, calledstationid, callingstationid, 
acctterminatecause, servicetype, framedprotocol, framedipaddress, 
acctstartdelay, acctstopdelay) TO stdout;

what can I do to resolve the problem?
This on RH9 updated and PostgreSQL v7.3.4
Thanks in advance.
Roberto Fichera. 

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


Re: [HACKERS] Problem on PG7.2.2

2002-09-24 Thread Roberto Fichera

At 09.31 24/09/02 -0400, Tom Lane wrote:
>Roberto Fichera <[EMAIL PROTECTED]> writes:
> > At 10.40 23/09/02 -0400, you wrote:
> >> I think you've got *serious* hardware problems.  Hard to tell if it's
> >> disk or memory, but get out those diagnostic programs now ...
>
> > database=# DROP TABLE TS;
> > ERROR:  cannot find attribute 1 of relation ts_pkey
> > database=# DROP INDEX TS_PKEY;
> > ERROR:  cannot find attribute 1 of relation ts_pkey
>
>Now you've got corrupted system indexes (IIRC this is a symptom of
>problems in one of the indexes for pg_attribute).
>
>You might be able to recover from this using a REINDEX DATABASE
>operation (read the man page carefully, it's a bit tricky), but
>I am convinced that you've got hardware problems.  I would suggest
>that you first shut down the database and then find and fix your
>hardware problem --- otherwise, things will just get worse and worse.
>After you have a stable platform again, you can try to restore
>consistency to the database.

Below there is the first try session and as you can see there is the same 
problem :-(!

bash-2.05a$ postgres -D /var/lib/pgsql/data -O -P database
DEBUG:  database system was shut down at 2002-09-24 18:39:24 CEST
DEBUG:  checkpoint record is at 0/2AE97110
DEBUG:  redo record is at 0/2AE97110; undo record is at 0/0; shutdown TRUE
DEBUG:  next transaction id: 366635; next oid: 1723171
DEBUG:  database system is ready

POSTGRES backend interactive interface
$Revision: 1.245.2.2 $ $Date: 2002/02/27 23:17:01 $

backend> reindex table detail;
FATAL 2:  open of /var/lib/pgsql/data/pg_clog/0504 failed: No such file or 
directory
DEBUG:  shutting down
DEBUG:  database system is shut down
bash-2.05a$


Roberto Fichera.


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

http://archives.postgresql.org



Re: [HACKERS] Problem on PG7.2.2

2002-09-24 Thread Roberto Fichera

At 09.31 24/09/02 -0400, Tom Lane wrote:

>Roberto Fichera <[EMAIL PROTECTED]> writes:
> > At 10.40 23/09/02 -0400, you wrote:
> >> I think you've got *serious* hardware problems.  Hard to tell if it's
> >> disk or memory, but get out those diagnostic programs now ...
>
> > database=# DROP TABLE TS;
> > ERROR:  cannot find attribute 1 of relation ts_pkey
> > database=# DROP INDEX TS_PKEY;
> > ERROR:  cannot find attribute 1 of relation ts_pkey
>
>Now you've got corrupted system indexes (IIRC this is a symptom of
>problems in one of the indexes for pg_attribute).

I'll run some memory checker.

>You might be able to recover from this using a REINDEX DATABASE
>operation (read the man page carefully, it's a bit tricky), but
>I am convinced that you've got hardware problems.  I would suggest
>that you first shut down the database and then find and fix your
>hardware problem --- otherwise, things will just get worse and worse.
>After you have a stable platform again, you can try to restore
>consistency to the database.

I'll try it.


Roberto Fichera.


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Problem on PG7.2.2

2002-09-24 Thread Roberto Fichera

At 10.40 23/09/02 -0400, you wrote:

>Roberto Fichera <[EMAIL PROTECTED]> writes:
> > database=# select count(*) from detail;
> >   count
> > 
> >   181661
> > (1 row)
>
> > database=# select count(*) from detail;
> >   count
> > 
> >   181660
> > (1 row)
>
> > database=# select count(*) from detail;
> > FATAL 2:  open of /var/lib/pgsql/data/pg_clog/0303 failed: No such file or
> > directory
>
>[ blinks... ]  That's with no one else modifying the table meanwhile?
>
>I think you've got *serious* hardware problems.  Hard to tell if it's
>disk or memory, but get out those diagnostic programs now ...

This table is used to hold all the logs for our Radius authentication & 
statistics,
so we have only INSERT from the radiusd server.
I had no problem at all. No crash no panic, nothing.

database=# \d ts
  Table "ts"
  Column | Type  | Modifiers
+---+---
  name   | character(15) |
  ip_int | cidr  | not null
Primary key: ts_pkey

database=# DROP TABLE TS;
ERROR:  cannot find attribute 1 of relation ts_pkey
database=# DROP INDEX TS_PKEY;
ERROR:  cannot find attribute 1 of relation ts_pkey
database=#

and again

[root@foradada pgsql]# pg_dump -d -f detail.sql -t detail database
pg_dump: dumpClasses(): SQL command failed
pg_dump: Error message from server: FATAL 2:  open of 
/var/lib/pgsql/data/pg_clog/0202 failed: No such file or directory
server closed the connection unexpectedly
 This probably means the server terminated abnormally
 before or while processing the request.
pg_dump: The command was: FETCH 100 FROM _pg_dump_cursor
[root@foradada pgsql]# ls -al
totale 10464
drwx--4 postgres postgres 4096 set 23 17:44 .
drwxr-xr-x   14 root root 4096 set 23 13:06 ..
drwx--2 postgres postgres 4096 ago 26 20:13 backups
-rw---1 postgres postgres 5519 set  5 00:53 .bash_history
-rw-r--r--1 postgres postgres  107 ago 26 20:13 .bash_profile
drwx--6 postgres postgres 4096 set 23 18:18 data
-rw-r--r--1 root root  6221242 set 24 12:04 detail.sql
-rw-r--r--1 root root  157 giu 25 14:43 initdb.i18n
-rw---1 postgres postgres10088 set  5 00:14 .psql_history
[root@foradada pgsql]#


Roberto Fichera.


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Problem on PG7.2.2

2002-09-23 Thread Roberto Fichera

At 10.40 23/09/02 -0400, Tom Lane wrote:

>Roberto Fichera <[EMAIL PROTECTED]> writes:
> > database=# select count(*) from detail;
> >   count
> > 
> >   181661
> > (1 row)
>
> > database=# select count(*) from detail;
> >   count
> > 
> >   181660
> > (1 row)
>
> > database=# select count(*) from detail;
> > FATAL 2:  open of /var/lib/pgsql/data/pg_clog/0303 failed: No such file or
> > directory
>
>[ blinks... ]  That's with no one else modifying the table meanwhile?

This table is used to hold all the logs from our Radius servers,
so we have only INSERT from the radiusd server.


>I think you've got *serious* hardware problems.  Hard to tell if it's
>disk or memory, but get out those diagnostic programs now ...

What diagnostic programs do you suggest ?


Roberto Fichera.


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[HACKERS] Problem on PG7.2.2

2002-09-23 Thread Roberto Fichera

Hi All,

When I try 2 or 3 consecutive select count(*) on my database I've the 
problem shown below.
Here is a psql session log:

[root@foradada root]# psql -d database
Welcome to psql, 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

database=# select version();
version
-
  PostgreSQL 7.2.2 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

database=# select count(*) from detail;
  count

  181661
(1 row)

database=# select count(*) from detail;
  count

  181660
(1 row)

database=# select count(*) from detail;
FATAL 2:  open of /var/lib/pgsql/data/pg_clog/0303 failed: No such file or 
directo
ry
server closed the connection unexpectedly
 This probably means the server terminated abnormally
 before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
database=#

Roberto Fichera.


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [HACKERS] Acucobol interface

2001-06-06 Thread Roberto Fichera

At 18.13 05/06/01 -0400, Tom Lane wrote:

>Roberto Fichera <[EMAIL PROTECTED]> writes:
> > My first think was to bypass the SQL translation and use the Postgresql 
> low
> > level routines.
> > I need to see the tables as record oriented archive, so I can scan
> > sequentially (forward and
> > backward) each record, lock/unlock it, insert and delete it and start to
> > read the records with
> > a match of a specific key.
>
>I don't think you want an SQL database at all.  Possibly something like
>Sleepycat's Berkeley DB package is closer to what you are looking for...
>
> regards, tom lane

I know the Sleepycat's Berkelay DB packages but isn't what I need.
I need a relational database that can be used outside our Acucobol program,
like Excel, Access, Apache and in general a SQL view of our data for external
analysis and presentation. This is why I'm thinking to use SQL and in 
particular
the PostgreSQL. Currently there is only one direct interface from Acucobol and
a SQL server and was developed by DBMaker for their SQL server, but have
some limitation that I want bypass.

regards,


Roberto Fichera.


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[HACKERS] Acucobol interface

2001-06-05 Thread Roberto Fichera

Hi All,

I'm developing (currently in pre-alfa stage) a Acucobol interface for the 
Postgresql.
The Acucobol runtime have a generic FS API interface that handle the work 
with the
record oriented files, defining the open, close, read, write and so on low 
level function I can
extend the runtime to talk with any file and database.

My current work translate each Acucobol FS command in a relative Postgresql 
query and
the returned tuple will be translated in a record oriented view.
After some performance tests I've notice that this path have much overhead 
and because
this I was thinking to redesign the interface.

My first think was to bypass the SQL translation and use the Postgresql low 
level routines.
I need to see the tables as record oriented archive, so I can scan 
sequentially (forward and
backward) each record, lock/unlock it, insert and delete it and start to 
read the records with
a match of a specific key.

Does anyone know where can I start to search/read/learn/study some 
document/code of the
Postgresql low level routines ?

If need some detail, please ask ;-)!

Thanks in advance.


Roberto Fichera.


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

http://www.postgresql.org/search.mpl