ALTER TABLE DROP COLUMN does just only disabling columns in system tables. It is very fast, but it doesn’t remove data from heap files. You have to do VACUUM FULL later to compact allocated file space. So ALTER TABLE DROP COLUMN is very fast. And to compact files, you have to call the slower (with exclusive LOCK) VACUUM FULL.
Related Contents:
- Primary key for multiple columns in PostgreSQL?
- PostgreSQL – set a default cell value according to another cell value
- Permission denied for relation
- Postgresql – unable to drop database because of some auto connections to DB
- PostgreSQL query to list all table names?
- Export and import table dump (.sql) using pgAdmin
- How to make a select with array contains value clause in psql
- Adding comment to column when I create table in PostgreSQL?
- Grant all on a specific schema in the db to a group role in PostgreSQL
- How to Disconnect from a database and go back to the default database in PostgreSQL?
- Now() without timezone
- Socket File “/var/pgsql_socket/.s.PGSQL.5432” Missing In Mountain Lion (OS X Server)
- Postgresql 9.2 pg_dump version mismatch
- Do I need to REINDEX and VACUUM a table after deleting lots of rows?
- Calculating and saving space in PostgreSQL
- Failed to find conversion function from unknown to text
- PostgreSQL 9.2 – Convert TEXT json string to type json/hstore
- Postgresql Truncation speed
- How to create a user for Postgres from the command line for bash automation
- postgresql migrating JSON to JSONB [duplicate]
- currval has not yet been defined this session, how to get multi-session sequences?
- How to append a new item into the array-type column in PostgreSQL
- How to change the template database collection coding
- CONSTRAINT to check values from a remotely related table (via join etc.)
- Postgres manually alter sequence
- Find the host name and port using PSQL commands
- psql: FATAL: Peer authentication failed for user “dev”
- How big is too big for a PostgreSQL table?
- Which datatype should be used for currency?
- How can I get a list of all functions stored in the database of a particular schema in PostgreSQL?
- PostgreSQL CASE … END with multiple conditions
- How to import existing *.sql files in PostgreSQL 8.4?
- How to see active connections and “current activity” in PostgreSQL 8.4
- How to restore PostgreSQL database from .tar file?
- PgAdmin: could not send data to server: Socket is not connected could not send SSL negotiation packet: Socket is not connected [closed]
- call multiple Sql files in a single SQL file in Postgres
- Postgres – could not create any TCP/IP sockets
- PostgreSQL alter type timestamp without time zone -> with time zone
- Postgres table column name restrictions?
- How can I test if a column exists in a table using an SQL statement
- PostgreSQL: How to DROP FUNCTION IF EXISTS without specifying parameters?
- alembic util command error can’t find identifier
- Postgres multiple joins
- Select today’s (since midnight) timestamps only
- How to dump a postgres db excluding one specific table?
- PostgreSQL: Show all the privileges for a concrete user
- The forgotten assignment operator “=” and the commonplace “:=”
- SELECT or INSERT a row in one command
- Sequences not affected by transactions?
- How to make my postgresql database use a case insensitive collation?