Re: [HACKERS] Control File

2006-04-17 Thread Tom Lane
"Bruno Almeida do Lago" <[EMAIL PROTECTED]> writes: > With the new tablespace scenario in mind, how do you see this check feature > being implemented: as a script or inside the code? I'd put it in the code, and share code somehow with the current check on $PGDATA/PG_VERSION (maybe factor that into

Re: [HACKERS] Control File

2006-04-17 Thread Bruno Almeida do Lago
Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Saturday, April 15, 2006 4:11 PM To: Jim C. Nasby Cc: Bruce Momjian; Bruno Almeida do Lago; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Control File "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > Perhaps an easy mean

Re: [HACKERS] Control File

2006-04-17 Thread Bruno Almeida do Lago
pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Control File Bruce Momjian writes: > Bruno Almeida do Lago wrote: >> After that night, I started to ask myself if PostgreSQL should not have a >> control file to check if expected datafiles are where they should be and >> JUST war

Re: [HACKERS] Control File

2006-04-15 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > Perhaps an easy means would be to put a PG_VERSION file in each > tablespace when it's created and then check all of them. Tablespaces > arguably make it slightly easier to accidentally try and mount something > from a different version... I believe we

Re: [HACKERS] Control File

2006-04-15 Thread Jim C. Nasby
On Sat, Apr 15, 2006 at 02:03:50PM -0500, Jim C. Nasby wrote: > Perhaps an easy means would be to put a PG_VERSION file in each > tablespace when it's created and then check all of them. Tablespaces > arguably make it slightly easier to accidentally try and mount something > from a different versio

Re: [HACKERS] Control File

2006-04-15 Thread Jim C. Nasby
On Fri, Apr 14, 2006 at 11:10:34AM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > As for adding checks to startup scripts, that's a PITA because > > those scripts will have no idea of where tablespaces might be defined, > > so you'd have to hard-code that info in. > OTOH

Re: [HACKERS] Control File

2006-04-14 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > As for adding checks to startup scripts, that's a PITA because > those scripts will have no idea of where tablespaces might be defined, > so you'd have to hard-code that info in. No, just look in $PGDATA/pg_tblspc to see where the symlinks point. I'd le

Re: [HACKERS] Control File

2006-04-14 Thread Andreas Pflug
Jim C. Nasby wrote: On Thu, Apr 13, 2006 at 04:39:59AM -0400, Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian writes: Bruno Almeida do Lago wrote: After that night, I started to ask myself if PostgreSQL should not have a control file to check if expected datafiles are where they shoul

Re: [HACKERS] Control File

2006-04-13 Thread Jim C. Nasby
On Thu, Apr 13, 2006 at 04:39:59AM -0400, Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian writes: > > > Bruno Almeida do Lago wrote: > > >> After that night, I started to ask myself if PostgreSQL should not have a > > >> control file to check if expected datafiles are where they should be

Re: [HACKERS] Control File

2006-04-13 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Bruno Almeida do Lago wrote: > >> After that night, I started to ask myself if PostgreSQL should not have a > >> control file to check if expected datafiles are where they should be and > >> JUST warn about missing ones? > > > I don't think this happens

Re: [HACKERS] Control File

2006-04-12 Thread Tom Lane
Bruce Momjian writes: > Bruno Almeida do Lago wrote: >> After that night, I started to ask myself if PostgreSQL should not have a >> control file to check if expected datafiles are where they should be and >> JUST warn about missing ones? > I don't think this happens frequently enough to add code

Re: [HACKERS] Control File

2006-04-12 Thread Bruce Momjian
Bruno Almeida do Lago wrote: > DBA takes another coffee and finally started the database which... just came > up! Few minutes latter lot off errors being displayed. What is that??? > /mnt/array2 (50% of datafiles and tablespaces were there) was still umounted > and even so PostgreSQL came up. -- Po

[HACKERS] Control File

2006-04-05 Thread Bruno Almeida do Lago
Quick (real) story to illustrate situation: Some time ago we used to have a server with 2 disk arrays attached to it. They were /mnt/array1 and /mnt/array2. PostgreSQL (8.0) had tablespaces on both. In one cold & dark night, one SCSI controller from array2 stopped, and manufacturer was called to

Re: [HACKERS] Control File

2006-01-13 Thread Qingqing Zhou
""Bruno Almeida do Lago"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Today I was playing with our test environment and noticed that if I delete > a > PostgreSQL datafile (with cluster down) and bring up the database, It will > simple... come up :-/ > > I wonder if

[HACKERS] Control File

2006-01-13 Thread Bruno Almeida do Lago
Hi, Today I was playing with our test environment and noticed that if I delete a PostgreSQL datafile (with cluster down) and bring up the database, It will simple... come up :-/ I wonder if it shouldn't complain about the missing datafile before opening the cluster... I don't know... Maybe so