Обсуждение: Re: [ADMIN] Major Problem, need help! Can't run our website!

Поиск
Список
Период
Сортировка

Re: [ADMIN] Major Problem, need help! Can't run our website!

От
Tim Allen
Дата:
ITS ONT Alcazar, Jose Aguedo C wrote:
> Anyone!
>
> Before anything else, I have no background in PostgreSQL. But I have a
> little knowledge in Linux. We used postgreSQL to run one of our website. It
> runs in Redhat Linux 7.3. Our System Administrator, who used to maintain
> this server, had resigned and didn't have a proper documentation on how to
> maintain this server. Right now, our NEW System Administrator is clearing
> some logs in /var/lib/pgsql/data/pg_xlog in able to free some space in the
> /var file system. It used to work before, but now, its not working anymore.
> Information below is the message we are encountering when we are trying to
> connect to the website. Please, ANYONE, help us!

We've seen reports of people firing this particular foot-gun before,
haven't we? Would it make sense to rename pg_xlog to something that
doesn't sound like it's "just" full of log files? Eg pg_wal - something
where the half-educated will have no idea what it is, and therefore not
think they know what they can do with it.

Tim

--
-----------------------------------------------
Tim Allen          tim@proximity.com.au
Proximity Pty Ltd  http://www.proximity.com.au/

Re: [ADMIN] Major Problem, need help! Can't run our website!

От
Tom Lane
Дата:
Tim Allen <tim@proximity.com.au> writes:
> We've seen reports of people firing this particular foot-gun before,
> haven't we? Would it make sense to rename pg_xlog to something that
> doesn't sound like it's "just" full of log files? Eg pg_wal - something
> where the half-educated will have no idea what it is, and therefore not
> think they know what they can do with it.

There's something in what you say.  We'd have to rename pg_clog as well,
since that's even more critical than pg_xlog ...

            regards, tom lane

Re: [ADMIN] Major Problem, need help! Can't run our website!

От
Christopher Kings-Lynne
Дата:
> We've seen reports of people firing this particular foot-gun before,
> haven't we? Would it make sense to rename pg_xlog to something that
> doesn't sound like it's "just" full of log files? Eg pg_wal - something
> where the half-educated will have no idea what it is, and therefore not
> think they know what they can do with it.

Would it be wise or insane for us to to mention in the startup error a
HINT that if you've removed such files, only hope is full restore from
backup or pg_resetxlog with data loss?

Chris


Re: [ADMIN] Major Problem, need help! Can't run our website!

От
Tom Lane
Дата:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Would it be wise or insane for us to to mention in the startup error a
> HINT that if you've removed such files, only hope is full restore from
> backup or pg_resetxlog with data loss?

Not sure that we should have a HINT recommending a worst-case-scenario
course of action as the first resort.  We'll have people blowing away
their data for what might be relatively fixable problems (eg, bogus
permissions on the pg_xlog directory, which I think was an issue that
just came up a day or two ago ...)

(We're all really jumping to conclusions here anyway.  The guy may have
been foolish to remove xlog files, but that doesn't explain why his
postmaster isn't running.  There's some facts missing in that report.)

            regards, tom lane

Re: [ADMIN] Major Problem, need help! Can't run our

От
Rod Taylor
Дата:
On Mon, 2005-11-14 at 23:02 -0500, Tom Lane wrote:
> Tim Allen <tim@proximity.com.au> writes:
> > We've seen reports of people firing this particular foot-gun before,
> > haven't we? Would it make sense to rename pg_xlog to something that
> > doesn't sound like it's "just" full of log files? Eg pg_wal - something
> > where the half-educated will have no idea what it is, and therefore not
> > think they know what they can do with it.
>
> There's something in what you say.  We'd have to rename pg_clog as well,
> since that's even more critical than pg_xlog ...

Rename them to pg_donttouchthis and pg_youneedthis.
--


Re: [ADMIN] Major Problem, need help! Can't run our

От
Tom Lane
Дата:
Rod Taylor <pg@rbt.ca> writes:
> On Mon, 2005-11-14 at 23:02 -0500, Tom Lane wrote:
>> There's something in what you say.  We'd have to rename pg_clog as well,
>> since that's even more critical than pg_xlog ...

> Rename them to pg_donttouchthis and pg_youneedthis.

:-)

On a more serious level: Tim's suggestion of "pg_wal" for pg_xlog sounds
fine to me.  How about "pg_trans" for pg_clog, by analogy to the
existing pg_subtrans?  Nothing else in the standard layout looks like
it's got a name that a newbie would think means discardable data.

            regards, tom lane

Re: [ADMIN] Major Problem, need help! Can't run our

От
"Jonah H. Harris"
Дата:
I agree.
 
(sorry again Tom... dang GMAIL should default reply to all.... grrrr!)
 
On 11/14/05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Rod Taylor <pg@rbt.ca> writes:
> On Mon, 2005-11-14 at 23:02 -0500, Tom Lane wrote:
>> There's something in what you say.  We'd have to rename pg_clog as well,
>> since that's even more critical than pg_xlog ...

> Rename them to pg_donttouchthis and pg_youneedthis.

:-)

On a more serious level: Tim's suggestion of "pg_wal" for pg_xlog sounds
fine to me.  How about "pg_trans" for pg_clog, by analogy to the
existing pg_subtrans?  Nothing else in the standard layout looks like
it's got a name that a newbie would think means discardable data.

                       regards, tom lane

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

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

Re: [ADMIN] Major Problem, need help! Can't run our website!

От
Trent Shipley
Дата:
On Monday 2005-11-14 20:48, Tim Allen wrote:

<snip>
OOPS deleted pg_xlog because surely it was only a log file.
</snip>
>
> We've seen reports of people firing this particular foot-gun before,
> haven't we? Would it make sense to rename pg_xlog to something that
> doesn't sound like it's "just" full of log files? Eg pg_wal - something
> where the half-educated will have no idea what it is, and therefore not
> think they know what they can do with it.
>
> Tim

Renaming the file sounds like an excellent design decision since the current 
name is a proven "human factor" bug.


Re: [ADMIN] Major Problem, need help! Can't run our website!

От
"Joshua D. Drake"
Дата:
>
> Renaming the file sounds like an excellent design decision since the current 
> name is a proven "human factor" bug.
>   
I am sorry, but as soon as you look at the files it is obvious that they 
are not "just" log files. If someone
is going to delete the xlog they are going to do it no matter what we 
call it. Unless of course we change
the directory to pg_xlogs_do_not_ever_delete, but I doubt that would 
help either.

Sincerely,
Joshua D. Drake



> ---------------------------(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
>