Alvaro Herrera | 1 Sep 2009 05:03
Favicon
Gravatar

Re: Postgresql.conf getting corrupted

Jason K. Ergle wrote:
> I am having a problem with postgreql.conf becoming corrupted.  We are using
> version 8.2.9 in embedded systems running Fedora Core 7.  Basically, the
> postgres server holds the data that our embedded systems need to run.  They
> are all using industrial solid state disk drives on the ext3 file system.
> The systems are cold booted occasionally by the operators if something
> becomes unresponsive.  I am not having a problem with the actual database,
> but it seems as though the postgresql.conf file becomes corrupted on
> occasion.   What happens is a random character in the file, such as an =
> will be replaced with another character, such as a 5.  Then the server
> refuses to start because of a syntax error in the file. 

That's pretty weird.  Are you using something like pgadmin to change the
server's configuration?  The config file is not opened for writing
normally.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Tom Lane | 1 Sep 2009 05:18
Picon

Re: Postgresql.conf getting corrupted

"Jason K. Ergle" <jason.ergle <at> camotion.com> writes:
> I am having a problem with postgreql.conf becoming corrupted.  We are using
> version 8.2.9 in embedded systems running Fedora Core 7.  Basically, the
> postgres server holds the data that our embedded systems need to run.  They
> are all using industrial solid state disk drives on the ext3 file system.
> The systems are cold booted occasionally by the operators if something
> becomes unresponsive.  I am not having a problem with the actual database,
> but it seems as though the postgresql.conf file becomes corrupted on
> occasion.   What happens is a random character in the file, such as an =
> will be replaced with another character, such as a 5.  Then the server
> refuses to start because of a syntax error in the file. 

I'd bet lunch you have bad RAM that's dropping a bit every so often.
It's worthy of note that ASCII '=' is 0x3D while '5' is 0x35, just
one bit different.

			regards, tom lane

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Venkat Godditi | 1 Sep 2009 11:15
Picon

ERROR: syntax error at or near "NEW"

HI,

 I am having a problem with connection of  two databases in different systems.Let me explain clearly.

 I have one postgres 8.4  server running in  my system and another postgres server running in
my friend system

My requirement is whenever ,I do some insertions  in a table in my postgres server  the same  things should be replicated
in another postgres server.

These are the steps I followed
----------------------------------------------------------------------------------------------------
1.Creation of  table in  a database named "testA" in  one system say "sys1"

CREATE TABLE emp
(
  empname text NOT NULL,
  salary integer
);

2.Creation of  table in  a database named "testB" in  another  system say "sys2"

CREATE TABLE emp
(
  empname text NOT NULL,
  salary integer
);

3.Creation of a  Function and Trigger in database "testA" in "sys1"

  CREATE OR REPLACE FUNCTION process_emp_audit() RETURNS TRIGGER AS $emp_audit$
    BEGIN
       IF (TG_OP = 'INSERT') THEN
            SELECT * FROM dblink_exec('hostname=sys2ip dbname=testB  user=postgres password=postgres','INSERT   INTO                  emp NEW.*');
            RETURN NEW;
        END IF;
        RETURN NULL;
    END;
$emp_audit$ LANGUAGE plpgsql;


CREATE TRIGGER emp_audit
BEFORE INSERT ON emp
    FOR EACH ROW EXECUTE PROCEDURE process_emp_audit();

4.The error I got is

  ERROR:  syntax error at or near "NEW"
CONTEXT:  Error occurred on dblink connection named "unnamed": could not execute command.
SQL statement "SELECT * FROM dblink_exec('dbname=test9','INSERT INTO emp NEW.*')"
PL/pgSQL function "process_emp_audit" line 3 at SQL statement

********** Error **********

ERROR: syntax error at or near "NEW"
SQL state: 42601
Context: Error occurred on dblink connection named "unnamed": could not execute command.
SQL statement "SELECT * FROM dblink_exec('dbname=test9','INSERT INTO emp NEW.*')"
PL/pgSQL function "process_emp_audit" line 3 at SQL statement.

---------------------------------------------------------------------------------------------------------------------------

So,I request you for any kind of solution for this  problem.

Thanks&Regards,
venkat.



samana srikanth | 1 Sep 2009 13:17
Picon

archive_command

can i change the "archive_command" from the postgres sql prompt ot sql command?

Thanks
Srikanth
Abbas | 1 Sep 2009 13:51
Picon

Re: archive_command



On Tue, Sep 1, 2009 at 4:47 PM, samana srikanth <samanasrikanth <at> gmail.com> wrote:
can i change the "archive_command" from the postgres sql prompt ot sql command?

Thanks
Srikanth

Nope,  You can't change archive_command from psql prompt.

............
Abbas
Jan-Peter Seifert | 1 Sep 2009 14:09
Picon
Picon

purging debugger functions?

Hello,

is there a proper way to remove the PostgreSQL debugger functions etc. from a database? It seems that the
pgInstaller for Windows does/did install them by default. So during restore they cause error messages in
servers without the debugging dll. It seems that the script pldbgapi.sql does install the debugger in the
database. However, not all of the functions listed there cause error messages. Are some them already in
template0? Is it safe trying to drop all of the functions/data types listed in pldbgapi.sql/pldbg.sql?
Didn't find any information in the official docs (debugger, debugging functions listed in pldbgapi.sql etc.).

Could you tell me, please?

Thank you very much,

Peter
-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Arnold, Sandra | 1 Sep 2009 18:08
Favicon

Snapshot and pg_hotbackup

Does anyone use OS snapshot as the file system backup solution in the pg_hotbackup instead of tar?  Using tar for a small database is not a problem is when you have a database that will be close to a Terrabyte in size it can be a problem.  I was wondering if changing the file system backup solution to a snapshot instead has been done.  I have PostgreSQL databases on Red Hat Linux and x86 64 bit Solaris.  The larger database will be on the Solaris server.
 
Thanks,
 
Sandra Arnold
Sr DBA
DOE/OSTI
Oak Ridge, TN
Kevin Grittner | 1 Sep 2009 20:17
Favicon

Re: Snapshot and pg_hotbackup

"Arnold, Sandra" <ArnoldS <at> osti.gov> wrote:

> Using tar for a small database is not a problem is when you have a
> database that will be close to a Terrabyte in size it can be a
> problem.  I was wondering if changing the file system backup
> solution to a snapshot instead has been done.

If snapshots turn out not to work well for you, and any significant
portions of the data remain unchanged from one base backup to the
next, you might want to check out this thread and the one it
references:

http://archives.postgresql.org/pgsql-admin/2009-07/msg00071.php

-Kevin

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Rafael Domiciano | 2 Sep 2009 18:06
Picon

Re: ERROR: syntax error at or near "NEW"

Boa Tarde Venkat,

Acredito que o erro está na sua chamada da função dblink_exec:
SELECT * FROM dblink_exec('hostname=sys2ip dbname=testB  user=postgres password=postgres','INSERT INTO emp NEW.*');

Pelo fato de você estar passando o NEW dentro de aspas, o postgres está entendendo que é uma string e não o identificador único NEW.

On Tue, Sep 1, 2009 at 6:15 AM, Venkat Godditi <venkatg.16 <at> gmail.com> wrote:
HI,

 I am having a problem with connection of  two databases in different systems.Let me explain clearly.

 I have one postgres 8.4  server running in  my system and another postgres server running in
my friend system

My requirement is whenever ,I do some insertions  in a table in my postgres server  the same  things should be replicated
in another postgres server.

These are the steps I followed
----------------------------------------------------------------------------------------------------
1.Creation of  table in  a database named "testA" in  one system say "sys1"

CREATE TABLE emp
(
  empname text NOT NULL,
  salary integer
);

2.Creation of  table in  a database named "testB" in  another  system say "sys2"

CREATE TABLE emp
(
  empname text NOT NULL,
  salary integer
);

3.Creation of a  Function and Trigger in database "testA" in "sys1"

  CREATE OR REPLACE FUNCTION process_emp_audit() RETURNS TRIGGER AS $emp_audit$
    BEGIN
       IF (TG_OP = 'INSERT') THEN
            SELECT * FROM dblink_exec('hostname=sys2ip dbname=testB  user=postgres password=postgres','INSERT   INTO                  emp NEW.*');
            RETURN NEW;
        END IF;
        RETURN NULL;
    END;
$emp_audit$ LANGUAGE plpgsql;


CREATE TRIGGER emp_audit
BEFORE INSERT ON emp
    FOR EACH ROW EXECUTE PROCEDURE process_emp_audit();

4.The error I got is

  ERROR:  syntax error at or near "NEW"
CONTEXT:  Error occurred on dblink connection named "unnamed": could not execute command.
SQL statement "SELECT * FROM dblink_exec('dbname=test9','INSERT INTO emp NEW.*')"
PL/pgSQL function "process_emp_audit" line 3 at SQL statement

********** Error **********

ERROR: syntax error at or near "NEW"
SQL state: 42601
Context: Error occurred on dblink connection named "unnamed": could not execute command.
SQL statement "SELECT * FROM dblink_exec('dbname=test9','INSERT INTO emp NEW.*')"
PL/pgSQL function "process_emp_audit" line 3 at SQL statement.

---------------------------------------------------------------------------------------------------------------------------

So,I request you for any kind of solution for this  problem.

Thanks&Regards,
venkat.




Wei Zheng | 2 Sep 2009 17:39
Picon
Favicon

Looking for real configuration data

[Sorry if you receive multiple copies of this message.] 
[Please feel free to forward the message to others who may be
interested.] 

Hi, 

We are a computer systems research group at the Computer Science
department at Rutgers University, and are conducting research on
simplifying the software configuration process.  The idea is to 
leverage the configurations of existing users of a piece of software to
ease the configuration process for each new user of the software. 

The reason for this message is that we would like to collect a large
number of deployed configurations to help evaluate our ideas. Thus, we
ask systems administrators and end users to submit information about
their configurations for any software that they have had to configure,
such as Apache, MySQL, and Linux. 

We hope that you have a few minutes to take our survey which is located
at: http://vivo.cs.rutgers.edu/massconf/MassConf.html As an incentive,
all surveys completed in their entirety will be entered into a drawing
of a number of $50 gift certificates (from Amazon.com). 

Important: Our work is purely scientific, so we have no interest in any
private or commercially sensitive information that may come along with
your configuration data.  We will make sure that no such information is
ever made public.  In fact, if you wish, you are more than welcome to
anonymize or remove any sensitive information from the configuration
data you send us. 

If you have any questions regarding this message or our work, feel free
to email Wei Zheng (wzheng at cs dot rutgers dot edu). 

Thanks for your time, 

Wei Zheng 
PhD student, Vivo Research Group (http://vivo.cs.rutgers.edu) 
Rutgers University 

--

-- 
Sent via pgsql-general mailing list (pgsql-general <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Gmane