Re: BUG #14168: ALTER TABLE SET LOGGED failing

From: Ganesh Kannan <ganesh(dot)kannan(at)weatheranalytics(dot)com>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Cc: David Gould <daveg(at)sonic(dot)net>
Subject: Re: BUG #14168: ALTER TABLE SET LOGGED failing
Date: 2016-06-01 16:30:35
Message-ID: BL2PR07MB235641E7327A170B7A3B469786470@BL2PR07MB2356.namprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

This is a false alarm . The free space error that I get from " alter table .. set logged" was not because of lack of space in the volumed used by the tablespace, but from the volumes used by the indexes of that table. Given the table was an "unlogged" table, indexes were also "unlogged", and it looks like " alter table ...set logged" also implicitly converts the indexes from "unlogged" to regular indexes.

After clearing enough space " alter table ...set logged" worked fine. It would help to mention the implicit index migration in the documentation.

Thanks David for the response. I did run the "df -i" command, and this is the result.

/dev/mapper/vg_data5-lv_data5 1521588112 9897 1521578215 1% /pg_data5

Thanks
Ganesh Kannan
________________________________________
From: David Gould <daveg(at)sonic(dot)net>
Sent: Wednesday, June 1, 2016 3:06 AM
To: Ganesh Kannan
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #14168: ALTER TABLE SET LOGGED failing

On Wed, 01 Jun 2016 04:57:41 +0000
ganesh(dot)kannan(at)weatheranalytics(dot)com wrote:

> The following bug has been logged on the website:
>
> Bug reference: 14168
>
> psql:mvTS2.sql:6: ERROR: could not extend file
> "pg_tblspc/16404/PG_9.5_201510051/16407/61740.1": wrote only 4096 of 8192
> bytes at block 175411
> HINT: Check free disk space.
> Time: 335539.031 ms
>
> However, there is enough free space available on the volumes to accommodate
> several of the tables, but ALTER TABLE set logged command consistently
> fails, df -h shows this:
>
> >> df -h | grep data5
> /dev/mapper/vg_pgdata5-lv_pgdata5 9.8T 9.5T 363G 97% /pg_data5

Sometimes the unix error ENOSPC covers more than disk space. For example
you could be out of inodes. What does df -i show?

-dg

--
David Gould 510 282 0869 daveg(at)sonic(dot)net
If simplicity worked, the world would be overrun with insects.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message 德哥 2016-06-02 01:04:21 Re: BUG #14167: ecpg parser cann't ignore code in #ifdef ?
Previous Message Kevin Grittner 2016-06-01 16:15:04 Re: BUG #14169: Incorrect merge join result in 9.5