pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: sql2pg <sekhar.career@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: WAL reducing size
Date: Mon, 4 Dec 2017 18:12:50 -0300
Message-ID: <20171204211250.ljsaxf2jhedjjerj@alvherre.pgsql> (raw)
In-Reply-To: <1512421534770-0.post@n3.nabble.com>

sql2pg wrote:
> how about uncommitted(open transactions) .  if a segment has 1 committed and
> 2 uncommitted transactions then will it keep the segment instead deleting it
> after checkpoint , since it has 2 uncommitted transactions 

There is no connection between transaction commit and checkpoint
removing WAL files.  WAL files are removed after two checkpoints have
occured, regardless of transactions that might be open.  The on-disk
effects of those transactions that occured before the earlier checkpoint
are already on disk anyway.  The commit record might appear at whatever
point in the future, and the rows will not become visible to other
transactions until then, regardless of what happened to the WAL
segments.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (5+ messages)  latest in thread

Message-ID: <20171204211250.ljsaxf2jhedjjerj@alvherre.pgsql>
Permalink:  ../20171204211250.ljsaxf2jhedjjerj@alvherre.pgsql/
Also on:    postgresql.org/message-id/20171204211250.ljsaxf2jhedjjerj@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: alvherre@alvh.no-ip.org, sekhar.career@gmail.com
  Subject: Re: WAL reducing size
  In-Reply-To: <20171204211250.ljsaxf2jhedjjerj@alvherre.pgsql>
  References: <1512421534770-0.post@n3.nabble.com> <20171204211250.ljsaxf2jhedjjerj@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox