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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Alter table set logged hanging after writing out all WAL
Date: 2018-02-07 00:01:49
Message-ID: 20180207000149.GA28623@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 foo_as_of_date_excl EXCLUDE USING gist (customer_id WITH
> =, as_of_date WITH &&);
>
> CREATE UNIQUE INDEX foo_idx1 ON foo USING btree (customer_id) WHERE
> (upper(as_of_date) = 'infinity'::date);
>
> CREATE INDEX foo_idx2 ON foo USING btree (customer_id, lower(as_of_date))
> WHERE (upper(as_of_date) = 'infinity'::date);
>
> CREATE UNIQUE INDEX foo_idx3 ON foo USING btree (customer_id,
> lower(as_of_date));

I am not sure, but I would think about something related to gist here
when heavy insertions are done on it... I cannot put my finger on the
thread though.

> This is all I see - please help me if there's a better command I can
> run:

If the process is still running, can you attach gdb to it and then run
the command bt? You may need to install debugging symbols to make the
trace readable.
--
Michael

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message godofsix 2018-02-07 00:05:34 RE: postgres instalation
Previous Message Adrian Klaver 2018-02-06 23:20:27 Re: pgadmin4: not possible to create server