pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ravi Krishna <srkrishna@fastmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Question about unlogged to logged conversion
Date: Thu, 27 Dec 2018 17:52:14 -0500
Message-ID: <1545951134.1308620.1619555704.45725FCC@webmail.messagingengine.com> (raw)
In-Reply-To: <CAPRu3+kryziCtrOt9Vv+xu=BTu6xhebAZVoX00LTpQ5Y8k25MQ@mail.gmail.com>
References: <CAPRu3+kryziCtrOt9Vv+xu=BTu6xhebAZVoX00LTpQ5Y8k25MQ@mail.gmail.com>


On Thu, Dec 27, 2018, at 5:23 PM, Bhavin Gandhi wrote:
> Hello,
> I'm trying to understand for a given unlogged table of a specific size
> and # of rows, if I do "alter table" on it to convert it to logged
> table, is there a performance difference between 9.5, 9.6 and 10? in
> other words are there specific improvements in this area that may not
> be available in all Postgres versions?> 

Unlogged tables are not stored in the catalog like a regular table. When
it is converted to a logged table , the entire operation is logged (goes
into wal logs) in one single transaction, blocking the entire table
during the process. IMO this makes unlogged -> logged workflow not a
right fit for large tables.  In other products I have used, large tables
are set to unlogged mode before bulk load and then set back to normal
logged mode.

view thread (3+ messages)  latest in thread

Message-ID: <1545951134.1308620.1619555704.45725FCC@webmail.messagingengine.com>
Permalink:  ../1545951134.1308620.1619555704.45725FCC@webmail.messagingengine.com/
Also on:    postgresql.org/message-id/1545951134.1308620.1619555704.45725FCC@webmail.messagingengine.com

 · 

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: srkrishna@fastmail.com
  Subject: Re: Question about unlogged to logged conversion
  In-Reply-To: <1545951134.1308620.1619555704.45725FCC@webmail.messagingengine.com>
  References: <CAPRu3+kryziCtrOt9Vv+xu=BTu6xhebAZVoX00LTpQ5Y8k25MQ@mail.gmail.com> <1545951134.1308620.1619555704.45725FCC@webmail.messagingengine.com>

* 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