Re: postgres wal log configuration question

From: Rui DeSousa <rui(at)crazybean(dot)net>
To: Pavan Kumar <pavan(dot)dba27(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: postgres wal log configuration question
Date: 2019-05-07 15:36:05
Message-ID: 56496583-595D-4267-A5F3-7C1AA877345A@crazybean.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On May 7, 2019, at 10:58 AM, Pavan Kumar <pavan(dot)dba27(at)gmail(dot)com> wrote:
>
>
>
> how do i understand the output ? Is this wal segment name ? If yes, when i look at wal log location i do see below output. how do i correlate query output with os command output ?
>
> postgres=# select pg_switch_wal();
> pg_switch_wal
> ---------------
> C/E000158
> (1 row)
>

Use pg_walfile_name(); i.e.

enso=# select pg_switch_wal();
pg_switch_wal
---------------
29CF/4D14B48
(1 row)

enso=# select pg_walfile_name('29CF/4D14B48');
pg_walfile_name
--------------------------
00000001000029CF00000000
(1 row)

enso=# select pg_walfile_name(pg_switch_wal());
pg_walfile_name
--------------------------
00000001000029CF00000001
(1 row)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andres Freund 2019-05-07 15:44:29 Re: Restoring from PostgreSQL 9.5 dump to 10 is super slow
Previous Message SAMMY CRISWELL 2019-05-07 15:13:53 Upgrade from psql version 9.3 to 9.6.