Thread: postgresql 7.1.3

postgresql 7.1.3

From
"samsom, debra"
Date:

I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except Postgresql will not start on Boot.  I have added the -o '-i' to the postgresql.conf and done the chkconfig --add postgresql.  Is there anything else that I am missing?

Debra Samsom
Bristol Aerospace Ltd.
(204) 775-8331 3402
dsamsom@bristol.ca

Re: postgresql 7.1.3

From
Keary Suska
Date:
Yes. The error log entries showing why Postgres won't boot. Without them, we
can't help you.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

From: "samsom, debra" <dsamsom@bristol.ca>
Date: Tue, 16 Oct 2001 13:39:15 -0500
To: "'pgsql-general@postgresql.org'" <pgsql-general@postgresql.org>
Subject: [GENERAL] postgresql 7.1.3



I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
Postgresql will not start on Boot.  I have added the -o '-i' to the
postgresql.conf and done the chkconfig --add postgresql.  Is there anything
else that I am missing?

Debra Samsom
Bristol Aerospace Ltd.
(204) 775-8331 3402
dsamsom@bristol.ca



Re: postgresql 7.1.3

From
Lamar Owen
Date:
On Tuesday 16 October 2001 02:39 pm, samsom, debra wrote:
> I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
> Postgresql will not start on Boot.  I have added the -o '-i' to the
> postgresql.conf and done the chkconfig --add postgresql.  Is there anything
> else that I am missing?

My apologies.  In my README.rpm-dist I missed a step:
chkconfig --level 345 postgresql on

Put the runlevels desired to start in in place of '345' above if desired.....
Sorry.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Blank SQL insert statements

From
"Ashley @ Turton"
Date:
I am developing a system to take a generic data structure and store it in a
PostgreSQL database.  The data structure contains several entries of the
following:

insert a record into table1
field1  value1
field2  value2

insert a record into table2
field1  value1
field2  value2

Data for different tables is stored in each 'data set'.  When I get this to
the database I want to:

insert a blank record into tablex
populate fieldx of new record with valuex

I could implement this with some if statements based on the table name, then
INSERT INTO x (...) VALUES (...), but I would prefer to kept the structure
as generic as possible.  Is it possible in PostgreSQL to construct a blank
record without specifying a list of fields and values in an INSERT statement
(so I can perform a collection for UPDATEs to populate the blank record)?


Ashley


Re: postgresql 7.1.3

From
Allan Engelhardt
Date:
Unfortunately the Red Had scripts redirects the output (stdout and stderr) from
pg_ctl to /dev/null.  Major brain-damage :-P

Debra: log on as postgres (su -l to root, then su -l to postgres) and try

     bash-2.04$ pg_ctl start

Have a look at the output & post it here if it doesn't make any sense.  You
should set PGDATA first, or use the -D option to pg_ctl.


Hope this helps a little.


Allan.

Keary Suska wrote:

> Yes. The error log entries showing why Postgres won't boot. Without them, we
> can't help you.
>
> Keary Suska
> Esoteritech, Inc.
> "Leveraging Open Source for a better Internet"
>
> From: "samsom, debra" <dsamsom@bristol.ca>
> Date: Tue, 16 Oct 2001 13:39:15 -0500
> To: "'pgsql-general@postgresql.org'" <pgsql-general@postgresql.org>
> Subject: [GENERAL] postgresql 7.1.3
>
>
>
> I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
> Postgresql will not start on Boot.  I have added the -o '-i' to the
> postgresql.conf and done the chkconfig --add postgresql.  Is there anything
> else that I am missing?
>
> Debra Samsom
> Bristol Aerospace Ltd.
> (204) 775-8331 3402
> dsamsom@bristol.ca
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


Re: Blank SQL insert statements

From
Allan Engelhardt
Date:
I'm not really recommending what you are trying to do [I prefer an INSERT with
all the values instead of UPDATE-ing the table multiple times...], but

  INSERT INTO x DEFAULT VALUES;

should more or less do what you want.  Of course the table must have default
values defined to satisfy any constraints or you can't sensibly insert an
'empty' column.

Allan.

Ashley @ Turton wrote:

> I am developing a system to take a generic data structure and store it in a
> PostgreSQL database.  The data structure contains several entries of the
> following:
>
> insert a record into table1
> field1  value1
> field2  value2
>
> insert a record into table2
> field1  value1
> field2  value2
>
> Data for different tables is stored in each 'data set'.  When I get this to
> the database I want to:
>
> insert a blank record into tablex
> populate fieldx of new record with valuex
>
> I could implement this with some if statements based on the table name, then
> INSERT INTO x (...) VALUES (...), but I would prefer to kept the structure
> as generic as possible.  Is it possible in PostgreSQL to construct a blank
> record without specifying a list of fields and values in an INSERT statement
> (so I can perform a collection for UPDATEs to populate the blank record)?
>
>
> Ashley
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


Re: postgresql 7.1.3

From
"samsom, debra"
Date:

I should made my question a little more clear.  Postgresql would start manually I just couldn't get it to start with the server after a reboot.

As it turns out I needed to do a 'chkconfig postgresql on'.  For some reason I don't remember having to do this before?  My database now starts with the server. 

Thanks for your responses

-----Original Message-----
From: Allan Engelhardt [mailto:allane@cybaea.com]
Sent: Wednesday, October 17, 2001 4:26 AM
To: Keary Suska; dsamsom@bristol.ca; pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgresql 7.1.3

Unfortunately the Red Had scripts redirects the output (stdout and stderr) from
pg_ctl to /dev/null.  Major brain-damage :-P

Debra: log on as postgres (su -l to root, then su -l to postgres) and try

     bash-2.04$ pg_ctl start

Have a look at the output & post it here if it doesn't make any sense.  You
should set PGDATA first, or use the -D option to pg_ctl.

Hope this helps a little.

Allan.

Keary Suska wrote:

> Yes. The error log entries showing why Postgres won't boot. Without them, we
> can't help you.
>
> Keary Suska
> Esoteritech, Inc.
> "Leveraging Open Source for a better Internet"
>
> From: "samsom, debra" <dsamsom@bristol.ca>
> Date: Tue, 16 Oct 2001 13:39:15 -0500
> To: "'pgsql-general@postgresql.org'" <pgsql-general@postgresql.org>
> Subject: [GENERAL] postgresql 7.1.3
>
>
>
> I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
> Postgresql will not start on Boot.  I have added the -o '-i' to the
> postgresql.conf and done the chkconfig --add postgresql.  Is there anything
> else that I am missing?
>
> Debra Samsom
> Bristol Aerospace Ltd.
> (204) 775-8331 3402
> dsamsom@bristol.ca
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

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

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

Re: postgresql 7.1.3

From
teg@redhat.com (Trond Eivind Glomsrød)
Date:
Lamar Owen <lamar.owen@wgcr.org> writes:

> On Tuesday 16 October 2001 02:39 pm, samsom, debra wrote:
> > I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
> > Postgresql will not start on Boot.  I have added the -o '-i' to the
> > postgresql.conf and done the chkconfig --add postgresql.  Is there anything
> > else that I am missing?
>
> My apologies.  In my README.rpm-dist I missed a step:
> chkconfig --level 345 postgresql on

You don't need the levels if you don't want to e.g. have it only start
in runlevel 5...

chkconfig postgresql on

is sufficient for most use.

--
Trond Eivind Glomsrød
Red Hat, Inc.

Re: postgresql 7.1.3

From
"samsom, debra"
Date:

This was my solution, thanks for all suggestions.

-----Original Message-----
From: teg@redhat.com [mailto:teg@redhat.com]
Sent: Wednesday, October 17, 2001 9:25 AM
To: Lamar Owen
Cc: samsom, debra; 'pgsql-general@postgresql.org'
Subject: Re: [GENERAL] postgresql 7.1.3

Lamar Owen <lamar.owen@wgcr.org> writes:

> On Tuesday 16 October 2001 02:39 pm, samsom, debra wrote:
> > I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
> > Postgresql will not start on Boot.  I have added the -o '-i' to the
> > postgresql.conf and done the chkconfig --add postgresql.  Is there anything
> > else that I am missing?
>
> My apologies.  In my README.rpm-dist I missed a step:
> chkconfig --level 345 postgresql on

You don't need the levels if you don't want to e.g. have it only start
in runlevel 5...

chkconfig postgresql on

is sufficient for most use.

--
Trond Eivind Glomsrød
Red Hat, Inc.

Re: Blank SQL insert statements

From
Peter Eisentraut
Date:
Ashley @ Turton writes:

> Is it possible in PostgreSQL to construct a blank record without
> specifying a list of fields and values in an INSERT statement (so I
> can perform a collection for UPDATEs to populate the blank record)?

INSERT INTO tablename DEFAULT VALUES;

(The default values are going to be NULL unless you specified something
else when you created the table.)

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


Re: postgresql 7.1.3

From
Lamar Owen
Date:
On Monday 06 May 2002 12:37 pm, David Fee wrote:
> Owen,
> Do you know how to get postmaster to start with the " -i " flag?  I want to
> use pgaccess and when I try to connect to the db, it gives an error message
> saving that the postmaster isn't running with the " -i " flag or accepting
> connections at port 5432.  If I start postmaster with " -i  " manually, it
> works fine, but I need it to start automatically

Find the file 'postgresql.conf' -- on RedHat with an RPM installation it is in
/var/lib/pgsql/data.  Edit this file -- change the line '#tcpip_socket =
false' to be 'tcpip_socket = true'  -- note the lack of the # comment.

Restart postmaster and you're done.  The -i switch is no longer necessary due
to the 'GUC' -- 'Grand Unified Configuration' file postgresql.conf.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11