Re: Alter table set logged hanging after writing out all WAL

2018-02-07 Thread Michael Paquier
On Wed, Feb 07, 2018 at 11:35:13AM -0600, Jeremy Finzel wrote: > I was able to get it to finish by just waiting awhile. To give you an > idea, the table with no indexes was set logged in 7 minutes. With the gist > index, it took 3 hours but finally finished. It is only writing WAL for > about th

Re: Alter table set logged hanging after writing out all WAL

2018-02-07 Thread Jeremy Finzel
On Tue, Feb 6, 2018 at 9:48 PM, Jeremy Finzel wrote: > On Tue, Feb 6, 2018 at 6:02 PM Michael Paquier > wrote: > >> On Tue, Feb 06, 2018 at 01:36:04AM -0600, Jeremy Finzel wrote: >> > Here is the basic structure - is the gist index significant?: >> > >> > CREATE UNLOGGED TABLE foo ( >> > as_

Re: Alter table set logged hanging after writing out all WAL

2018-02-06 Thread Jeremy Finzel
On Tue, Feb 6, 2018 at 6:02 PM Michael Paquier wrote: > On Tue, Feb 06, 2018 at 01:36:04AM -0600, Jeremy Finzel wrote: > > Here is the basic structure - is the gist index significant?: > > > > CREATE UNLOGGED TABLE foo ( > > as_of_date daterange NOT NULL, > > customer_id integer, > >

Re: Alter table set logged hanging after writing out all WAL

2018-02-06 Thread Michael Paquier
On Tue, Feb 06, 2018 at 01:36:04AM -0600, Jeremy Finzel wrote: > Here is the basic structure - is the gist index significant?: > > CREATE UNLOGGED TABLE foo ( > as_of_date daterange NOT NULL, > customer_id integer, > bunch_of_fields_here); > > ALTER TABLE ONLY foo > ADD CONSTRAINT

Re: Alter table set logged hanging after writing out all WAL

2018-02-05 Thread Jeremy Finzel
Here is the basic structure - is the gist index significant?: CREATE UNLOGGED TABLE foo ( as_of_date daterange NOT NULL, customer_id integer, bunch_of_fields_here); ALTER TABLE ONLY foo ADD CONSTRAINT foo_as_of_date_excl EXCLUDE USING gist (customer_id WITH =, as_of_date WITH &&);

Re: Alter table set logged hanging after writing out all WAL

2018-02-05 Thread Michael Paquier
On Tue, Feb 06, 2018 at 12:50:56AM -0600, Jeremy Finzel wrote: > The table I am setting to logged is 32GB with indexes. I see it writing > WAL files like crazy but after about an hour and a half, it has written out > some 2500 WAL segments, then it just sits and continues to run as "active", > but

Alter table set logged hanging after writing out all WAL

2018-02-05 Thread Jeremy Finzel
We are running: PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit The table I am setting to logged is 32GB with indexes. I see it writing WAL files like crazy but after about an hour and a half, it has written out some 2500 WAL segments, then it just sits and