Обсуждение: WAL file naming convention

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

WAL file naming convention

От
"Sriram Dandapani"
Дата:

Hi

 

Is is safe to assume that the unix ls command will return WAL files in the same sequence as postgres creates them.

 

e.g will ls <wal-file-folder> return files in the order that postgres created them

Re: WAL file naming convention

От
"Andy Shellam"
Дата:
As PostgreSQL numbers WALs sequentially, as long as your ls command by default orders listings by filename, then Yes.  Or you could list by the last modified date/time should give the same effect.
 
Andy


From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Sriram Dandapani
Sent: Saturday, 25 March, 2006 12:30 am
To: pgsql-admin@postgresql.org
Subject: [ADMIN] WAL file naming convention

Hi

 

Is is safe to assume that the unix ls command will return WAL files in the same sequence as postgres creates them.

 

e.g will ls <wal-file-folder> return files in the order that postgres created them

!DSPAM:14,44248f2235041511888239!

Re: WAL file naming convention

От
"Jim C. Nasby"
Дата:
On Sat, Mar 25, 2006 at 05:51:13PM -0000, Andy Shellam wrote:
> As PostgreSQL numbers WALs sequentially, as long as your ls command by
> default orders listings by filename, then Yes.  Or you could list by the
> last modified date/time should give the same effect.

But note that the order it creates them in doesn't have much meaning,
because it can re-use them. So if you want to know anything about actual
current order of usage the filename is meaningless.

>   _____
>
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Sriram Dandapani
> Sent: Saturday, 25 March, 2006 12:30 am
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] WAL file naming convention
>
>
>
> Hi
>
>
>
> Is is safe to assume that the unix ls command will return WAL files in the
> same sequence as postgres creates them.
>
>
>
> e.g will ls <wal-file-folder> return files in the order that postgres
> created them
>
> !DSPAM:14,44248f2235041511888239!

--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

Re: WAL file naming convention

От
"Sriram Dandapani"
Дата:
I was referring to the logs in the archive folder specified when WAL
archiving is turned on...not the pg_xlog folder.

I assume postgres will not use the logs in the archive folder

-----Original Message-----
From: Jim C. Nasby [mailto:jnasby@pervasive.com]
Sent: Monday, March 27, 2006 2:35 AM
To: Andy Shellam
Cc: Sriram Dandapani; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] WAL file naming convention

On Sat, Mar 25, 2006 at 05:51:13PM -0000, Andy Shellam wrote:
> As PostgreSQL numbers WALs sequentially, as long as your ls command by
> default orders listings by filename, then Yes.  Or you could list by
the
> last modified date/time should give the same effect.

But note that the order it creates them in doesn't have much meaning,
because it can re-use them. So if you want to know anything about actual
current order of usage the filename is meaningless.

>   _____
>
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Sriram
Dandapani
> Sent: Saturday, 25 March, 2006 12:30 am
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] WAL file naming convention
>
>
>
> Hi
>
>
>
> Is is safe to assume that the unix ls command will return WAL files in
the
> same sequence as postgres creates them.
>
>
>
> e.g will ls <wal-file-folder> return files in the order that postgres
> created them
>
> !DSPAM:14,44248f2235041511888239!

--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

Re: WAL file naming convention

От
"Jim C. Nasby"
Дата:
On Mon, Mar 27, 2006 at 09:28:43AM -0800, Sriram Dandapani wrote:
> I was referring to the logs in the archive folder specified when WAL
> archiving is turned on...not the pg_xlog folder.
>
> I assume postgres will not use the logs in the archive folder

Correct. And I believe if you have PITR enabled PostgreSQL also won't
re-use WAL names, though I'm not positive on that one.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

Re: WAL file naming convention

От
Bruce Momjian
Дата:
Jim C. Nasby wrote:
> On Mon, Mar 27, 2006 at 09:28:43AM -0800, Sriram Dandapani wrote:
> > I was referring to the logs in the archive folder specified when WAL
> > archiving is turned on...not the pg_xlog folder.
> >
> > I assume postgres will not use the logs in the archive folder
>
> Correct. And I believe if you have PITR enabled PostgreSQL also won't
> re-use WAL names, though I'm not positive on that one.

PostgreSQL never reuses WAL _names_ (since initdb), it only reuses WAL
files by renaming.

--
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +