Re: [ADMIN] Postgres server output log
Thanks guys for the replies.
I am using redhat linux 8.0 and postgres 7.2.3. I
started my postgresql server with the following
command after making the changes
pg_ctl start -D /usr/local/pgsql/data -o "-i"
If I understood correctly the syslog should have
created a log file at /var/log/postgresql.log but it
didnt do it. I am not sure what is the correct way of
starting the postgres after making the changes so as
to use the syslog and the log rotation script. Any
help is appreciated.
Thanks,
Tarun
--- "Rajesh Kumar Mallah." <[EMAIL PROTECTED]>
wrote:
>
>
>
> This is someones' elses' posting that i have
> preserved
> shud be useful.
>
> regds
> mallah.
>
>
~`
>
> Well,
> the most correct way to do a logrotate is ( Redhat
> ):
>
> 1) Put on your postgresql.conf the following lines:
>
> syslog = 2
> syslog_facility = 'LOCAL0'
> syslog_ident = 'postgres'
>
> 2) Put on the directory /etc/logrotate.d a file
> called
> 'postgres' with the following lines:
>
> /var/log/postgresql.log {
> compress
> rotate 2
> size=1k
> errors [EMAIL PROTECTED]
> create 0664 postgres postgres
> daily
> postrotate
> /usr/bin/killall -HUP syslogd
> endscript
> }
>
> change the email address of course :-)
>
> 3) Put the following line on your /etc/syslog.conf
>
> # Save postgresql logs
> LOCAL0.*
> /var/log/postgresql.log
>
>
> Ciao
> Gaetano
>
>
---
>
>
> On Thursday 30 January 2003 10:21 am, Mintoo Lall
> wrote:
> > Hi Everybody,
> >
> > I am new to postgresql. I started my postgres
> using the command
> >
> > postmaster -D /usr/local/pgsql/data > logfile 2>&1
> &
> >
> > Now after running it for some time I noticed that
> the size of this logfile
> > has become very large. Is this logfile used to
> store any important
> > information used by the database for recovery in
> case of crash? If no,is
> > there any way I can specify a different log file
> withouting stopping the
> > server ?
> >
> > Any help is appreciated.
> >
> > Thanks,
> >
> > Tarun
> >
> >
> >
> > -
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now
>
> --
>
>
>
> Regds Mallah
> Rajesh Kumar Mallah,
> Project Manager (Development)
> Infocom Network Limited, New Delhi
> phone: +91(11)26152172 (221) (L) 9811255597 (M)
> Visit http://www.trade-india.com ,
> India's Leading B2B eMarketplace.
>
>
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---(end of
broadcast)---
TIP 4: Don't 'kill -9' the postmasterDo you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Re: [ADMIN] Making connections to postgres under FreeBSD
I went back to 7.3.1 and everything is fine. I did start it with -i so it was listening. thanks for your help though. Steve -Original Message- From: Oliver Vecernik [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 4:28 PM To: Sill-II, Stephen Cc: Pgsql-Admin (E-mail) Subject: Re: [ADMIN] Making connections to postgres under FreeBSD Sill-II, Stephen schrieb: >Hi, > >Quick question. I'm very familiar with setting postgresql up under linux. >I recently installed it on a FreeBSD box, and I'm having trouble making >TCP/IP connections to it. I have set it to allow those connections under >the postgresql.conf file, and it's listening on the proper port. When I try >to connect with PG admin from remotely it says there is no entry for my IP >address in pg_hba.conf. The problem with this is that there IS an entry for >my IP. > Did you start postmaster with -i option? Oliver -- VECERNIK Datenerfassungssysteme A-2560 Hernstein, Hofkogelgasse 17 Tel.: +43 2633 47530, Fax: DW 50 http://members.aon.at/vecernik ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [ADMIN] Postgres server output log
Thanks guys for the replies.
I am using redhat linux 8.0 and postgres 7.2.3. I
started my postgresql server with the following
command after making the changes
pg_ctl start -D /usr/local/pgsql/data -o "-i"
If I understood correctly the syslog should have
created a log file at /var/log/postgresql.log but it
didnt do it. I am not sure what is the correct way of
starting the postgres after making the changes so as
to use the syslog and the log rotation script. Any
help is appreciated.
Thanks,
Tarun
--- "Rajesh Kumar Mallah." <[EMAIL PROTECTED]>
wrote:
>
>
>
> This is someones' elses' posting that i have
> preserved
> shud be useful.
>
> regds
> mallah.
>
>
~`
>
> Well,
> the most correct way to do a logrotate is ( Redhat
> ):
>
> 1) Put on your postgresql.conf the following lines:
>
> syslog = 2
> syslog_facility = 'LOCAL0'
> syslog_ident = 'postgres'
>
> 2) Put on the directory /etc/logrotate.d a file
> called
> 'postgres' with the following lines:
>
> /var/log/postgresql.log {
> compress
> rotate 2
> size=1k
> errors [EMAIL PROTECTED]
> create 0664 postgres postgres
> daily
> postrotate
> /usr/bin/killall -HUP syslogd
> endscript
> }
>
> change the email address of course :-)
>
> 3) Put the following line on your /etc/syslog.conf
>
> # Save postgresql logs
> LOCAL0.*
> /var/log/postgresql.log
>
>
> Ciao
> Gaetano
>
>
---
>
>
> On Thursday 30 January 2003 10:21 am, Mintoo Lall
> wrote:
> > Hi Everybody,
> >
> > I am new to postgresql. I started my postgres
> using the command
> >
> > postmaster -D /usr/local/pgsql/data > logfile 2>&1
> &
> >
> > Now after running it for some time I noticed that
> the size of this logfile
> > has become very large. Is this logfile used to
> store any important
> > information used by the database for recovery in
> case of crash? If no,is
> > there any way I can specify a different log file
> withouting stopping the
> > server ?
> >
> > Any help is appreciated.
> >
> > Thanks,
> >
> > Tarun
> >
> >
> >
> > -
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now
>
> --
>
>
>
> Regds Mallah
> Rajesh Kumar Mallah,
> Project Manager (Development)
> Infocom Network Limited, New Delhi
> phone: +91(11)26152172 (221) (L) 9811255597 (M)
> Visit http://www.trade-india.com ,
> India's Leading B2B eMarketplace.
>
>
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---(end of
broadcast)---
TIP 4: Don't 'kill -9' the postmasterDo you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Re: [ADMIN] Making connections to postgres under FreeBSD
Are you connecting on the "localhost" -- I saw no entry in your pg_hba.conf for localhost... Also -- Was postgres STARTED with -i or did you just change the pgoptions file and NOT restart your postgres server or reload the options file ??? pg_ctl RELOAD... ""Sill-II, Stephen"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Quick question. I'm very familiar with setting postgresql up under linux. > I recently installed it on a FreeBSD box, and I'm having trouble making > TCP/IP connections to it. I have set it to allow those connections under > the postgresql.conf file, and it's listening on the proper port. When I try > to connect with PG admin from remotely it says there is no entry for my IP > address in pg_hba.conf. The problem with this is that there IS an entry for > my IP. > > I'm using the canned BSD install of postgres 7.4 > > I'm sure this is just silly. > > Below is my pg_hba.conf > > > Thanks, > > Stephen Sill II > > > P.S. Greatbridge was the best! > > > > # Authentication" for a complete description. A short synopsis > # follows. > # > # This file controls: which hosts are allowed to connect, how clients > # are authenticated, which PostgreSQL user names they can use, which > # databases they can access. Records take one of three forms: > # > # localDATABASE USER METHOD [OPTION] > # host DATABASE USER IP-ADDRESS IP-MASK METHOD [OPTION] > # hostssl DATABASE USER IP-ADDRESS IP-MASK METHOD [OPTION] > # > # (The uppercase quantities should be replaced by actual values.) > # DATABASE can be "all", "sameuser", "samegroup", a database name (or > # a comma-separated list thereof), or a file name prefixed with "@". > # USER can be "all", an actual user name or a group name prefixed with > # "+" or a list containing either. IP-ADDRESS and IP-MASK specify the > # set of hosts the record matches. METHOD can be "trust", "reject", > # "md5", "crypt", "password", "krb4", "krb5", "ident", or "pam". Note > # that "password" uses clear-text passwords; "md5" is preferred for > # encrypted passwords. OPTION is the ident map or the name of the PAM > # service. > # > # This file is read on server startup and when the postmaster receives > # a SIGHUP signal. If you edit the file on a running system, you have > # to SIGHUP the postmaster for the changes to take effect, or use > # "pg_ctl reload". > > # Put your actual configuration here > # -- > # > # CAUTION: The default configuration allows any local user to connect > # using any PostgreSQL user name, including the superuser, over either > # Unix-domain sockets or TCP/IP. If you are on a multiple-user > # machine, the default configuration is probably too liberal for you. > # Change it to use something other than "trust" authentication. > # > # If you want to allow non-local connections, you need to add more > # "host" records. Also, remember TCP/IP connections are only enabled > # if you enable "tcpip_socket" in postgresql.conf. > > # TYPE DATABASEUSERIP-ADDRESSIP-MASK METHOD > local all all > trust > hostall all 127.0.0.1 255.255.255.255 > trust > hostall all MYIPADDRESS255.255.255.255 > trust > hostall all ::1 > :::::trust > > ---(end of broadcast)--- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[ADMIN] pg_restore problem with 7.3.1
I am upgrading my PostgreSQL install from 7.2.3 to 7.3.1. I ran into a problem with pg_restore creating the database. I am not sure if this is a documentation problem or a real bug. I have one database with BLOBs and used tar format backup: "pg_dump -Ft -b mpmx > backup.tar". I saw the -C option for pg_restore to create the database. The man page also says that with the -C option, the -d option specifies the database create the database from pg_restore -C -d template1 backup.tar Instead of creating the mpmx database, the command loaded everything into the template1 database. Is the man page correct about the operation of the -C option? Should I have run things differently? I noticed that without the -d option, pg_restore spits out a script to restore the database. Should I create the database manually and restore it by piping pg_restore into psql? How can I return template1 to its initial state? - Ian ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[ADMIN] COPY as non super user
how should I use " COPY arti FROM 'ARTI.txt' USING DELIMITERS '|' " as normal user ? ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [ADMIN] COPY as non super user
On Fri, Jan 31, 2003 at 11:13:04 +0100, Jaume Teixi <[EMAIL PROTECTED]> wrote: > how should I use " COPY arti FROM 'ARTI.txt' USING DELIMITERS '|' " as normal user ? If you are using psql, use the \copy command. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
