pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Alter command getting stuck on a table
Date: Tue, 7 Jan 2020 03:34:50 -0600
Message-ID: <8ce3a6b4-050c-5759-a86b-ef23bf46a545@gmail.com> (raw)
In-Reply-To: <CAMTQpJALSF2EvBqmdYCqKnXx-o2VQZ4+KRn1TsstudQukC0Ryg@mail.gmail.com>
References: <CAMTQpJALSF2EvBqmdYCqKnXx-o2VQZ4+KRn1TsstudQukC0Ryg@mail.gmail.com>

On 1/7/20 3:28 AM, Shrikant Bhende wrote:
> Hello,
>
> I am trying to add a column to a table but it's not working,

What version of postgres?
What was the error message?


> I have also tried reindex and drop on the same table but those commands 
> are also getting stuck.
>
> Below is the table structure and lock details
>
>
> Table "csp_details.gcp_compute_pricing"
>
> Column|Type | Collation | Nullable | Default
>
> ---------------------------------------------------------+-----------------------------+-----------+----------+-------------------------------------------------------------
>
> id| bigint| | not null | 
> nextval('csp_details.gcp_compute_pricing_id_seq'::regclass)
>
> instance_type | character varying(255)| ||
>
> hourly_rate_full_lowest_price_with_full_sustained_usage | real| ||
>
> hourly_rate_typical_price | real| ||
>
> hourly_rate_full_price_without_sustained_usage| real| ||
>
> hourly_rate_preemptible_price_per_hour| real| ||
>
> region| character varying(255)| ||
>
> platform| character varying(255)| ||
>
> last_updated_timestamp| timestamp without time zone | || now()
>
> current_generation| boolean | || false
>
> Indexes:
>
> "gcp_compute_pricing_pkey" PRIMARY KEY, btree (id)
>
>
>
>
>
> PG_stat_activity O/P
>
>
> -[ RECORD 1 
> ]----+---------------------------------------------------------------------------------------------
>
> datid| 24823
>
> datname| vmware
>
> pid| 6672
>
> usesysid | 10
>
> usename| postgres
>
> application_name | psql
>
> client_addr|
>
> client_hostname|
>
> client_port| -1
>
> backend_start| 2020-01-07 08:31:39.26237+00
>
> xact_start | 2020-01-07 08:36:21.025266+00
>
> query_start| 2020-01-07 08:36:21.025266+00
>
> state_change | 2020-01-07 08:36:21.025273+00
>
> wait_event_type| Lock
>
> wait_event | relation
>
> state| active
>
> backend_xid| 388218816
>
> backend_xmin | 388175669
>
> query| alter table csp_details.gcp_compute_pricing add 
> one_yr_commitment_price_hourly_rate real;
>
> backend_type | client backend
>
> -[ RECORD 2 
> ]----+-----------------------------------------------------------------------------------------
>
>
> On this table normal vacuum is working but when I tried for VACUUM FULL it 
> was not working, I have tried to take pg_dump in case there's any 
> corruption, pg_dump is working fine.
>
>
> Thanks
>

-- 
Angular momentum makes the world go 'round.

view thread (7+ messages)  latest in thread

Message-ID: <8ce3a6b4-050c-5759-a86b-ef23bf46a545@gmail.com>
Permalink:  ../8ce3a6b4-050c-5759-a86b-ef23bf46a545@gmail.com/
Also on:    postgresql.org/message-id/8ce3a6b4-050c-5759-a86b-ef23bf46a545@gmail.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Alter command getting stuck on a table
  In-Reply-To: <8ce3a6b4-050c-5759-a86b-ef23bf46a545@gmail.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