Fredrik Israelsson | 2 Oct 2006 14:27
Picon
Favicon

Installation placed on read only partition

Hi!
I would like to install postgresql on a Linux system where as much as 
possible of the OS- and program specific directories will be turned read 
only after installation.
My intent is to place all files that needs to be writable on a second, 
read/write partition.

My question is:
Is there some files and/or directories in the postgresql installation that 
has to remain writable after installation?
Of course, the directory pointed out by initdb -D will be in the read/write 
partition, and the same goes for the file pointed out by the -l flag for 
pg_ctl.

Thanks in advance!

Best regards,
Fredrik Israelsson

_________________________________________________________________
Klarar kräftskivan vädret? http://www.msn.se/weather/

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

Magnus Hagander | 2 Oct 2006 14:31

Re: Installation placed on read only partition

> Hi!
> I would like to install postgresql on a Linux system where as much
> as possible of the OS- and program specific directories will be
> turned read only after installation.
> My intent is to place all files that needs to be writable on a
> second, read/write partition.
> 
> My question is:
> Is there some files and/or directories in the postgresql
> installation that has to remain writable after installation?
> Of course, the directory pointed out by initdb -D will be in the
> read/write partition, and the same goes for the file pointed out by
> the -l flag for pg_ctl.

The directory of the unix socket file and the pid file also needs to be
writable. That's normally not kept in the same dir as any program files
or such, though.

//Magnus

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

               http://archives.postgresql.org

Pallav Kalva | 2 Oct 2006 17:04

Postgres Logging doesnt work

Hi ,

    My production database stopped writting to the postgres log files
all of a sudden, does anybody know why ?

   Database seems to run fine.

    Postgres version is 8.0.2

   Here are my settings

 log_connections                | off
 log_destination                | stderr
 log_directory                  | /var/lib/pgsql/pg_log
 log_disconnections             | off
 log_duration                   | off
 log_error_verbosity            | default
 log_executor_stats             | off
 log_filename                   | postgresql-%U.log
 log_hostname                   | off
 log_line_prefix                | %t%%%r%%%u%%%d
 log_min_duration_statement     | 30000
 log_min_error_statement        | panic
 log_min_messages               | notice
 log_parser_stats               | off
 log_planner_stats              | off
 log_rotation_age               | 10080
 log_rotation_size              | 0
 log_statement                  | ddl
 log_statement_stats            | off
(Continue reading)

Andrew Sullivan | 2 Oct 2006 18:12
Picon

Re: Postgres Logging doesnt work

On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
> Hi ,
> 
>     My production database stopped writting to the postgres log files
> all of a sudden, does anybody know why ?

How big is the file?

>  log_rotation_age               | 10080
>  log_rotation_size              | 0

You've set this up to rotate once every 10,080 minutes, no matter
what.  If you've run into a file size limit, then you'll be out of
luck until the next file is opened, which should be on the same day
of the week the postmaster was last started.  Just a guess.

A

--

-- 
Andrew Sullivan  | ajs <at> crankycanuck.ca
"The year's penultimate month" is not in truth a good way of saying
November.
		--H.W. Fowler

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

               http://archives.postgresql.org

(Continue reading)

Pallav Kalva | 2 Oct 2006 18:23

Re: Postgres Logging doesnt work

Hi Andrew,

     Thanks! for the reply, it is a small file. the file size on it is
735K that's pretty small. Not sure why it stopped writing to the log
file, is there any way to start logging without starting postgres ?

Pallav.

Andrew Sullivan wrote:
> On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
>   
>> Hi ,
>>
>>     My production database stopped writting to the postgres log files
>> all of a sudden, does anybody know why ?
>>     
>
> How big is the file?
>
>   
>>  log_rotation_age               | 10080
>>  log_rotation_size              | 0
>>     
>
> You've set this up to rotate once every 10,080 minutes, no matter
> what.  If you've run into a file size limit, then you'll be out of
> luck until the next file is opened, which should be on the same day
> of the week the postmaster was last started.  Just a guess.
>
> A
(Continue reading)

tatyana.krasnokutsky | 2 Oct 2006 18:06
Favicon

Please. Do cancel my subscription!!


I am trying to be unsubscribed member already many times and I am still
getting a lot of mail.
PLEASE!!!
Do cancel my subscription!!

Please send me a confirmation on cancelation.

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

               http://www.postgresql.org/docs/faq

Shoaib Mir | 2 Oct 2006 18:35
Picon

Re: Postgres Logging doesnt work

I guess that might work:

1. Set the following in postgresql.conf file --> log_rotation_age = 1
2. rename the already present log file from dbserver logs folder
3. Now do --> pg_ctl reload (so that log_rotation_age change you did comes in affect)
4. Check the log folder after a while (after 1 minutes) and it will be having a new log file and doing all the logging there
5. After it starts the logging you can revert the change done to rotation_age and do a reload again.

Thanks,
---
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)



On 10/2/06, Pallav Kalva <pkalva <at> livedatagroup.com> wrote:
Hi Andrew,

     Thanks! for the reply, it is a small file. the file size on it is
735K that's pretty small. Not sure why it stopped writing to the log
file, is there any way to start logging without starting postgres ?

Pallav.

Andrew Sullivan wrote:
> On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
>
>> Hi ,
>>
>>     My production database stopped writting to the postgres log files
>> all of a sudden, does anybody know why ?
>>
>
> How big is the file?
>
>
>>  log_rotation_age               | 10080
>>  log_rotation_size              | 0
>>
>
> You've set this up to rotate once every 10,080 minutes, no matter
> what.  If you've run into a file size limit, then you'll be out of
> luck until the next file is opened, which should be on the same day
> of the week the postmaster was last started.  Just a guess.
>
> A
>
>


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Joshua D. Drake | 2 Oct 2006 18:49
Favicon

Re: 回覆: Re: [ADMIN] How can I restore fr

Chan Michael wrote:
> Hi Jim,
> 
> Thanks for your info.
> 
> Then in PostgreSQL 7.3  how can I use the WAL log to recover?

WAL will recover itself on restart of a PostgreSQL server.

Sincerely,

Joshua D. Drake

> 
> Michael
> 
> "Jim C. Nasby" <jim <at> nasby.net> 說: On Thu, Sep 28, 2006 at 10:16:19PM +0800, Chan Michael wrote:
>> Hi,
>>
>> I am new to PostgreSQL and now want to know how can I recover from a database crash.
>>
>> I know pg_dump and pg_restore but with pg_dump all transactions between every pg_dump will be lost. I
found WAL in the doc and seems with it I can archieve point-in-time recovery. But I don't know the exact
steps of doing this.
> 
> Point in Time Recovery wasn't added until version 8.0.

--

-- 

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
             http://www.commandprompt.com/

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

               http://archives.postgresql.org

Pallav Kalva | 2 Oct 2006 19:39

Re: Postgres Logging doesnt work


Thanks! Shoaib,  that worked real good. Not sure why it stopped in the
first place.

Shoaib Mir wrote:
> I guess that might work:
>
> 1. Set the following in postgresql.conf file --> log_rotation_age = 1
> 2. rename the already present log file from dbserver logs folder
> 3. Now do --> pg_ctl reload (so that log_rotation_age change you did
> comes in affect)
> 4. Check the log folder after a while (after 1 minutes) and it will be
> having a new log file and doing all the logging there
> 5. After it starts the logging you can revert the change done to
> rotation_age and do a reload again.
>
> Thanks,
> ---
> Shoaib Mir
> EnterpriseDB (www.enterprisedb.com <http://www.enterprisedb.com>)
>
>
>
> On 10/2/06, *Pallav Kalva * <pkalva <at> livedatagroup.com
> <mailto:pkalva <at> livedatagroup.com>> wrote:
>
>     Hi Andrew,
>
>          Thanks! for the reply, it is a small file. the file size on it is
>     735K that's pretty small. Not sure why it stopped writing to the log
>     file, is there any way to start logging without starting postgres ?
>
>     Pallav.
>
>     Andrew Sullivan wrote:
>     > On Mon, Oct 02, 2006 at 11:04:11AM -0400, Pallav Kalva wrote:
>     >
>     >> Hi ,
>     >>
>     >>     My production database stopped writting to the postgres log
>     files
>     >> all of a sudden, does anybody know why ?
>     >>
>     >
>     > How big is the file?
>     >
>     >
>     >>  log_rotation_age               | 10080
>     >>  log_rotation_size              | 0
>     >>
>     >
>     > You've set this up to rotate once every 10,080 minutes, no matter
>     > what.  If you've run into a file size limit, then you'll be out of
>     > luck until the next file is opened, which should be on the same day
>     > of the week the postmaster was last started.  Just a guess.
>     >
>     > A
>     >
>     >
>
>
>     ---------------------------(end of
>     broadcast)---------------------------
>     TIP 9: In versions below 8.0, the planner will ignore your desire to
>            choose an index scan if your joining column's datatypes do not
>            match
>
>

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

               http://www.postgresql.org/docs/faq

Allan Kamau | 3 Oct 2006 09:54
Picon
Favicon

[SQL Question] Selecting distinct rows having field value pairs on semantics

Hi all,
I am looking for a way of selecting records from a
table comprising of pairing fields having unique
semantics, where the pair of values of lets say 'left'
and 'right' and another pair having values of 'right'
and 'left' is considered as duplicates as they have
the same meaning.

Below is my table structure.
create table ppi_edges_tf
(
tf_id1 char(6)not null,
tf_id2 char(6)not null,
primary key(tf_id1,tf_id2)
);

I would like to create a query on this table that will
contain only unique [tf_id1 and tf_id2] combination is
unique semantically.
for example looking at a select rows of the table
tf_id1 | tf_id2
-------+--------
T00111 | T00111
T00111 | T00112
T00111 | T01400
T00111 | T05015
T00112 | T00111

The second record (T00111 | T00112) and the fifth
record(T00112 | T00111) have the same pairing meaning
and should be considered duplicate in my case and only
one for the records (either one) should be contained
in the desired resultset of unique values.
The desired resultset could be something like this
tf_id1 | tf_id2
-------+--------
T00111 | T00111
T00111 | T00112
T00111 | T01400
T00111 | T05015

Allan.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 1: 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


Gmane