# Wal archival in yugabyte

**URL:** <https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442>\
**Category:** General\
**Created:** [January 16, 2024, 4:50am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442 "2024-01-16T04:50:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![subh14](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@subh14](https://forum.yugabyte.com/u/subh14)\
**Post date:** [January 16, 2024, 4:50am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/1 "2024-01-16T04:50:06Z")

</div>

Hi  
I am new to Yugabyte, going for a POC in yugabyte with YSQL, confused about WAL archival. If i use separate mount point for wal storage, do I need to set up WAL Archival separately? If so, it will be a great help if i can have the process.

Thanking you in advance

---

<div class="post-metadata">

**Author:** ![FranckPachot](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/franckpachot/32/353_2.png) [@FranckPachot](https://forum.yugabyte.com/u/FranckPachot)\
**Post date:** [January 16, 2024, 7:11am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/2 "2024-01-16T07:11:18Z")

</div>

Hi @subh14, YugabyteDB uses PostgreSQL only for the stateless query layer, to provide PostgreSQL compatibility, but the storage (WAL, datafiles) is different: distributed over the network to the cluster.  
The PostgreSQL WAL archival is not used. Each tablet n the tablet server has its own WAL in different format, replicated though Raft if you have Replication Factor 3 or more

---

<div class="post-metadata">

**Author:** ![subh14](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@subh14](https://forum.yugabyte.com/u/subh14)\
**Post date:** [January 17, 2024, 5:47am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/3 "2024-01-17T05:47:54Z")

</div>

Thank you Franck for your prompt response.  
I have another query, which is…I have a Yugabyte 3 node cluster. System time is in IST, however nodes works in UTC, which is fine. Just want to know if I create a daily or monthly partition on a table, will it follow UTC time to store data in partition table or IST time?  
And making --ysql\_timezone IST, will it follow IST time to store data in partitions following IST timezone?

Thank you for your help in advance.

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 17, 2024, 9:19am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/4 "2024-01-17T09:19:23Z")

</div>

> [@subh14](#):
>
> Just want to know if I create a daily or monthly partition on a table, will it follow UTC time to store data in partition table or IST time?

Can you show how you’re creating the partition and how the check is done?

---

<div class="post-metadata">

**Author:** ![subh14](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@subh14](https://forum.yugabyte.com/u/subh14)\
**Post date:** [January 17, 2024, 9:46am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/5 "2024-01-17T09:46:55Z")

</div>

Sure…I have a partition table temp and parition on datetime column. running a ysql as  
create table temp\_2024\_01\_17 partition of temp for values from (‘2024-01-17’) to (‘2024-01-18’)  
And i am expecting the data should be inside temp\_2024\_01\_17 table from 12 AM IST, system time is in IST.

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 17, 2024, 10:27am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/6 "2024-01-17T10:27:49Z")

</div>

> [@subh14](#):
>
> parition on datetime column

There is no `datetime` column in PostgreSQL, so you need to be more specific.

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 17, 2024, 10:38am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/7 "2024-01-17T10:38:44Z")

</div>

> [@subh14](#):
>
> system time is in IST.

What is the session timezone when the insert is done ?

```sql
show timezone;

```

---

<div class="post-metadata">

**Author:** ![subh14](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@subh14](https://forum.yugabyte.com/u/subh14)\
**Post date:** [January 17, 2024, 11:04am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/8 "2024-01-17T11:04:54Z")

</div>

## TimeZone

UTC  
(1 row)  
…this is the output of show timezone; command

---

<div class="post-metadata">

**Author:** ![subh14](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@subh14](https://forum.yugabyte.com/u/subh14)\
**Post date:** [January 17, 2024, 11:41am UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/9 "2024-01-17T11:41:51Z")

</div>

sorry…its column\_name with **timestamp with time zone** data type.

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [January 17, 2024, 12:22pm UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/10 "2024-01-17T12:22:41Z")

</div>

By default, the comparison will be done in the current session timezone.

But you can also do it like so:

```sql
yugabyte=# show time zone;
 TimeZone 
----------
 UTC
(1 row)

yugabyte=# select to_char(now(), 'HH24:MI:SS'), to_char(now() AT TIME ZONE 'IST', 'HH24:MI:SS');
 to_char | to_char  
----------+----------
 12:19:29 | 14:19:29
(1 row)

```

So you either have to change the time zone when the query runs (can be changed in multiple ways) or make sure to specify the timezone when making the comparison.

---

<div class="post-metadata">

**Author:** ![subh14](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@subh14](https://forum.yugabyte.com/u/subh14)\
**Post date:** [January 17, 2024, 12:42pm UTC](https://forum.yugabyte.com/t/wal-archival-in-yugabyte/2442/11 "2024-01-17T12:42:04Z")

</div>

Hi Dorian  
Thank you for your response. I am thinking about inserts.
