Re: [GENERAL] Time travel?

2016-09-29 Thread Melvin Davidson
On Thu, Sep 29, 2016 at 3:20 PM, Thomas Munro  wrote:

> On Fri, Sep 30, 2016 at 8:17 AM, Kevin Grittner  wrote:
> > On Thu, Sep 29, 2016 at 2:06 PM, Melvin Davidson 
> wrote:
> >
> >> I am using PostgreSQL 9.4.0 (Yes, I know 9.4.9 is most recent but
> >> it's out of my control)
> >
> > As long as the decision-maker is aware that 9.4.0 has known bugs
> > (fixed in later minor releases) that can render the database
> > unusable without warning...
> >
> >> How is it possible for the WAL file to be accessed BEFORE it was
> >> created?
> >
> > Perhaps renaming it counts as "creation" without affecting access
> > time.
>
> Apparently some filesystems change the ctime for rename and others
> don't, and POSIX tolerates both.
>
> --
> Thomas Munro
> http://www.enterprisedb.com
>

>Apparently some filesystems change the ctime for rename and others
>don't, and POSIX tolerates both.

OK, thanks. Back to the future! :D

-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Time travel?

2016-09-29 Thread Thomas Munro
On Fri, Sep 30, 2016 at 8:17 AM, Kevin Grittner  wrote:
> On Thu, Sep 29, 2016 at 2:06 PM, Melvin Davidson  wrote:
>
>> I am using PostgreSQL 9.4.0 (Yes, I know 9.4.9 is most recent but
>> it's out of my control)
>
> As long as the decision-maker is aware that 9.4.0 has known bugs
> (fixed in later minor releases) that can render the database
> unusable without warning...
>
>> How is it possible for the WAL file to be accessed BEFORE it was
>> created?
>
> Perhaps renaming it counts as "creation" without affecting access
> time.

Apparently some filesystems change the ctime for rename and others
don't, and POSIX tolerates both.

-- 
Thomas Munro
http://www.enterprisedb.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Time travel?

2016-09-29 Thread Paul Jungwirth

Hi Melvin:

On 09/29/2016 12:06 PM, Melvin Davidson wrote:

I list the creation time for a WAL file and it shows:

 /home/mdavidson/dba$ ls -l --time=ctime
/d-log/pg_xlog/0001000D00C9
-rw--- 1 postgres postgres 16777216 Sep 29 07:14
/d-log/pg_xlog/0001000D00C9


ctime stands for "changed" not "created". It is not quite the same as 
mtime ("modified") because mtime is updated only when the file contents 
change, but ctime is updated if either the file contents or file 
attributes change:


http://www.linux-faqs.info/general/difference-between-mtime-ctime-and-atime

I hope that explains it!

Paul


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Time travel?

2016-09-29 Thread Kevin Grittner
On Thu, Sep 29, 2016 at 2:06 PM, Melvin Davidson  wrote:

> I am using PostgreSQL 9.4.0 (Yes, I know 9.4.9 is most recent but
> it's out of my control)

As long as the decision-maker is aware that 9.4.0 has known bugs
(fixed in later minor releases) that can render the database
unusable without warning...

> How is it possible for the WAL file to be accessed BEFORE it was
> created?

Perhaps renaming it counts as "creation" without affecting access
time.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Time travel?

2016-09-29 Thread Melvin Davidson
*So here is a strange question. I am using PostgreSQL 9.4.0 (Yes, I know
9.4.9 is most recent but it's out of my control) O/S is AWS Debian 3.16.7-2
(2014-11-06) x86_64 GNU/Linux. I list the creation time for a WAL file and
it shows: /home/mdavidson/dba$ ls -l --time=ctime
/d-log/pg_xlog/0001000D00C9-rw--- 1 postgres postgres
16777216 Sep 29 07:14 /d-log/pg_xlog/0001000D00C9but then I
list the access time for a WAL file and it shows: /home/mdavidson/dba$ ls
-l --time=atime /d-log/pg_xlog/0001000D00C9-rw--- 1
postgres postgres 16777216 Sep  7 14:33
/d-log/pg_xlog/0001000D00C9How is it possible for the WAL file
to be accessed BEFORE it was created?Am I overlooking something simple?*



*Melvin Davidson*


Re: [GENERAL] Time Travel

1998-07-12 Thread Herouth Maoz

At 14:34 +0300 on 12/7/98, Andy wrote:


 We use Prostgres 6.3.2 for our production system, but the Postgres
 tables is growing when the data updated (time travel?). Could any one
 help me to stop this time travel problem, since it make our system slow,
 and data corrputed frequently, our table size is about 150 MB (after
 vacuum), and 210 MB (before vacuum). The table is updated about 100
 thousands time per day, and we do the daily vacuum for the table.

Explain: does the table grow relative to what it is supposed to contain
even *after* you do the vacuum? Because growing prior to vacuum is
expected. Nothing is actually deleted until vacuum is performed.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





Re: [GENERAL] Time Travel

1998-07-12 Thread Bruce Momjian

 We use Prostgres 6.3.2 for our production system, but the Postgres
 tables is growing when the data updated (time travel?). Could any one
 help me to stop this time travel problem, since it make our system slow,
 and data corrputed frequently, our table size is about 150 MB (after
 vacuum), and 210 MB (before vacuum). The table is updated about 100
 thousands time per day, and we do the daily vacuum for the table.

I have talked to Vadim about auto-reusing superceeded rows.  It is on
the todo list.  Currently, only vacuum removes old rows.

-- 
Bruce Momjian  |  830 Blythe Avenue
[EMAIL PROTECTED]  |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive, |  (610) 353-9879(w)
  +  Christ can be your backup.|  (610) 853-3000(h)