Mohammad Tanvir Huda | 1 Aug 2004 05:54
Picon
Favicon

Re: How can i start up POSTMASTER from unprivilege account

Hello 
 
Actually i am not sure at which user group they assignment me. I have try the following things . But havent have much lluck. Postgres is installed in serveral places in the server.
 
mahar:~> locate postmaster
/etc/postgresql/postmaster.conf
/opt/nimrod/pgsql-7.3.6/bin/postmaster
/opt/nimrod/pgsql-7.3.6/doc/html/app-postmaster.html
/opt/nimrod/pgsql-7.3.6/doc/html/postmaster-shutdown.html
/opt/nimrod/pgsql-7.3.6/doc/html/postmaster-start.html
/opt/nimrod/pgsql-7.3.6/man/man1/postmaster.1
/usr/lib/postgresql/bin/postmaster
/usr/share/man/man1/postmaster.1.gz
I create data folder in my own space and given the write to my user name
 
mahar:~> /usr/lib/postgresql/bin/initdb  -D data
The files belonging to this database system will be owned by user "huda".
This user must also own the server process.
The database cluster will be initialized with locale C.
fixing permissions on existing directory data... ok
creating directory data/base... ok
creating directory data/global... ok
creating directory data/pg_xlog... ok
creating directory data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema... ok
vacuuming database template1... ok
copying template1 to template0... ok
Success. The database server should be started automatically.
If not, you can start the database server using:
    /etc/init.d/postgresql start
 
Then i edit the file postgresql.conf  and uncomment the following lines so that it cant talk to a TCP/IP port
 
tcpip_socket = false
max_connections = 100
        # note: increasing max_connections costs about 500 bytes of shared
        # memory per connection slot, in addition to costs from shared_buffers
        # and max_locks_per_transaction.
#superuser_reserved_connections = 2
port = 5432
Then i try to start up the server and it showed me that it started successfully,
 
 su -c '/usr/lib/postgresql/bin/pg_ctl start -D data -l serverlog' huda
Password:
postmaster successfully started
 
But when i am trying to create the database or log in to psql shell it giving me error .
 
mahar:~> /usr/lib/postgresql/bin/psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
mahar:~> /usr/lib/postgresql/bin/create
createdb*   createlang* createuser*
mahar:~> /usr/lib/postgresql/bin/createdb test
createdb: could not connect to database template1: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
 
Can you please guide me where is the problem?
 
That will be very helpful
 
Regards
 
Mohammad Tanvir Huda

 
 
 
 
"Goulet, Dick" <DGoulet <at> vicr.com> wrote:
Your username would have to have the same group as PostGreSQL assigned to you, normally DBA.
 

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA

-----Original Message-----
From: Mohammad Tanvir Huda [mailto:shayer009 <at> yahoo.com]
Sent: Thursday, July 29, 2004 9:30 PM
To: pgsql-admin <at> postgresql.org
Subject: [ADMIN] How can i start up POSTMASTER from unprivilege account

Hello All

 

I have an account in our cluster. This is a normal linux use.

 

Our administrator have set up postgres there. But he have n't start up the postgreSQL server in the cluster.

 

Can anyone tell me how can I start up the postmaster and from an user space. Where should i need to configure. As getting administrative privilege cannot be possible as it is in an university.  

 

Pls tell me at your earliest.  I am very new to postgreSQL.  

 

Pls help me out.

 

Regards

 Shayer

 

Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.

Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
Gaetano Mendola | 2 Aug 2004 15:08
Picon

running only pg_autovacuum for one week


Hi all,
I did the experiment of running only the autovacuum for one week without
running my daily autovacuum full and reindex on heavy updated/inserted
tables.
Yesterday I reenabled the vacuum full and reindex and, as you can see
from the attachment, I recover 600MB of wasted space.

Regards
Gaetano Mendola


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo <at> postgresql.org so that your
      message can get through to the mailing list cleanly
Anjan Dave | 2 Aug 2004 17:27
Favicon

perl(Pg) error on contrib package

Hi,

 

I recently upgraded from 7.2.4 to 7.4.1, but can’t install the contrib rpm.

 

# rpm -ivh postgresql-contrib-7.4.1-1PGDG.i386.rpm

error: Failed dependencies:

        perl(Pg) is needed by postgresql-contrib-7.4.1-1PGDG

 

I installed the ‘postgresql-pl-7.4.1-1PGDG.i386.rpm’ package, but that didn’t help.

 

Here’s what’s installed so far…

 

postgresql-7.4.1-1PGDG

postgresql-libs-7.2.4-5.80

postgresql-libs-7.4.1-1PGDG

postgresql-server-7.4.1-1PGDG

postgresql-pl-7.4.1-1PGDG

 

Some of perl packages –

perl-DBD-Pg-1.13-5

perl-5.8.0-88.3

 

 

Appreciate any pointers,

 

Thanks,
Anjan

Devrim GUNDUZ | 2 Aug 2004 17:39

Re: perl(Pg) error on contrib package


Hi,

On Mon, 2 Aug 2004, Anjan Dave wrote:

> I recently upgraded from 7.2.4 to 7.4.1, but can't install the contrib
> rpm.
> 
> # rpm -ivh postgresql-contrib-7.4.1-1PGDG.i386.rpm
> 
> error: Failed dependencies:
> 
>         perl(Pg) is needed by postgresql-contrib-7.4.1-1PGDG

AFAIR, there was a wrong dependency in the package.

Use --nodeps option. It will work.

Regards,
--
Devrim GUNDUZ	       
devrim~gunduz.org				devrim.gunduz~linux.org.tr 
			http://www.tdmsoft.com
			http://www.gunduz.org
Scott Marlowe | 2 Aug 2004 18:12
Favicon

Re: running only pg_autovacuum for one week

On Mon, 2004-08-02 at 07:08, Gaetano Mendola wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> I did the experiment of running only the autovacuum for one week without
> running my daily autovacuum full and reindex on heavy updated/inserted
> tables.
> Yesterday I reenabled the vacuum full and reindex and, as you can see
> from the attachment, I recover 600MB of wasted space.

autovacuum is a daemon.  You don't run it once a week, you set it loose
and forget about it.  Unless you're running it then shutting it down,
running once a week is unnecessary.

Also, what are you fsm settings in the postgresql.conf file?

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo <at> postgresql.org

Gaetano Mendola | 2 Aug 2004 18:39
Picon

Re: running only pg_autovacuum for one week

Scott Marlowe wrote:
 > On Mon, 2004-08-02 at 07:08, Gaetano Mendola wrote:
 >
 >>-----BEGIN PGP SIGNED MESSAGE-----
 >>Hash: SHA1
 >>
 >>Hi all,
 >>I did the experiment of running only the autovacuum for one week without
 >>running my daily autovacuum full and reindex on heavy updated/inserted
 >>tables.
 >>Yesterday I reenabled the vacuum full and reindex and, as you can see
 >>from the attachment, I recover 600MB of wasted space.
 >
 >
 > autovacuum is a daemon.  You don't run it once a week, you set it loose
 > and forget about it.  Unless you're running it then shutting it down,
 > running once a week is unnecessary.

Sorry, I meant that I had running "only" the pg_autovacuum for the entire week,
without run also my vacuum full + reindex once a day. I was only stopping it and
rerunning for logrotation purpose.
Analyzing the graph on Wednedsay I had a few of processes in "idle in transaction"
state and as you can see the graph had a big ramp and that space was not reclamed
till this morning :-(

 > Also, what are you fsm settings in the postgresql.conf file?

At the end of my autovacuum full I have:

INFO:  free space map: 603 relations, 38202 pages stored; 40592 total pages needed
DETAIL:  Allocated FSM size: 1000 relations + 2000000 pages = 11780 kB shared memory.

So I think that I'm not reaching the limits.

As explained in another thread untill I can not set the "threasholds" per table
the autovacuum is useless ( milions rows tables with hundred of insert per day ).

Regards
Gaetano Mendola

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

Jodi Kanter | 2 Aug 2004 20:32
Favicon

no dup rows

I have a linking table that has only two fields in it and both are foreign keys to other tables. I'd like to ensure that there are never any duplicate rows in this table. I was planning on creating a multi-column unique index to satisfy this requirement. Is there a more appropriate way to accomplish this or am I on the right track?>
thanks.
Jodi
--
_______________________________

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter <at> virginia.edu

 

Bill Harper | 2 Aug 2004 21:05
Favicon

Re: no dup rows

Jodi Kanter wrote:

> I have a linking table that has only two fields in it and both are 
> foreign keys to other tables. I'd like to ensure that there are never 
> any duplicate rows in this table. I was planning on creating a 
> multi-column unique index to satisfy this requirement. Is there a more 
> appropriate way to accomplish this or am I on the right track?>
> thanks.
> Jodi
> -- 
>
> /_______________________________
> //Jodi L Kanter
> BioInformatics Database Administrator
> University of Virginia
> (434) 924-2846
> jkanter <at> virginia.edu <mailto:jkanter <at> virginia.edu100>/
>
>  
>
Just create a primary key on the two columns, that way you get 
uniqueness and not null constraints.

-bill

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

Reece Hart | 2 Aug 2004 21:09

Re: no dup rows

On Mon, 2004-08-02 at 11:32, Jodi Kanter wrote:
I have a linking table that has only two fields in it and both are foreign keys to other tables. I'd like to ensure that there are never any duplicate rows in this table. I was planning on creating a multi-column unique index to satisfy this requirement. Is there a more appropriate way to accomplish this or am I on the right track?>

Yep, that is the correct way to impose this constraint.

I give constraints meaningful names prefixed by the table name (e.g., tablename_seq_already_in_set) so that the cause of an error is more readily identifiable. This is particularly useful for insertions into complex tables with multiple constraints.

-Reece
-- -- Reece Hart, Ph.D. rkh <at> gene.com, http://www.gene.com/ Genentech, Inc. 650-225-6133 (voice), -5389 (fax) Bioinformatics and Protein Engineering 1 DNA Way, MS-93 http://www.in-machina.com/~reece/ S. San Francisco, CA 94080-4990 reece <at> in-machina.com, GPG: 0x25EC91A0
Peter Eisentraut | 2 Aug 2004 21:01
Picon
Gravatar

Re: no dup rows

Jodi Kanter wrote:
> I have a linking table that has only two fields in it and both are
> foreign keys to other tables. I'd like to ensure that there are never
> any duplicate rows in this table. I was planning on creating a
> multi-column unique index to satisfy this requirement. Is there a
> more appropriate way to accomplish this or am I on the right track?>

In "linking tables" you should usually make the entire set of columns 
the primary key.  This would solve your problem.

--

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

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


Gmane