PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15672
PG Version11.2
OSUbuntu 18.10
Opened2019-03-06 15:06:53+00
Reported byJianing Yang
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15672
Logged by:          Jianing Yang
Email address:      (redacted)
PostgreSQL version: 11.2
Operating system:   Ubuntu 18.10
Description:        

Reproduce steps:

1. create a partition table with the following constraints
    a. with a unique key on partition key and a varchar type field
    b. using hash partition
2. alter the  length of the varchar type field
3. drop the partition table in a transaction
4. crash

Screenshot:
→ pgcli -h localhost -p 5555 -U postgres -W
Server: PostgreSQL 11.2
Version: 2.0.1
Chat: https://gitter.im/dbcli/pgcli
Mail: https://groups.google.com/forum/#!forum/pgcli
Home: http://pgcli.com

postgres@localhost:postgres> show server_version;                           
                               
+-------------------------------+
| server_version                |
|-------------------------------|
| 11.2 (Debian 11.2-1.pgdg90+1) |
+-------------------------------+
SHOW
Time: 0.011s
postgres@localhost:postgres> create table users(user_id int, name varchar
(64), unique (user_id, name)) partition by hash(user_id);                   
                                                                
CREATE TABLE
Time: 0.004s
postgres@localhost:postgres> create table users_000 partition of users for
values with (modulus 2, remainder 0);                                       
                                                               
CREATE TABLE
Time: 0.012s
postgres@localhost:postgres> create table users_001 partition of users for
values with (modulus 2, remainder 1);                                       
                                                               
CREATE TABLE
Time: 0.012s
postgres@localhost:postgres> alter table users alter column name type
varchar(127);                         
You're about to run a destructive command.
Do you want to proceed? (y/n): y
Your call!
ALTER TABLE
Time: 0.007s
postgres@localhost:postgres> \d users;                                      
                               
+----------+------------------------+-------------+
| Column   | Type                   | Modifiers   |
|----------+------------------------+-------------|
| user_id  | integer                |             |
| name     | character varying(127) |             |
+----------+------------------------+-------------+
Indexes:
    "users_user_id_name_key" UNIQUE CONSTRAINT, btree (user_id, name)
Partition key: HASH (user_id)
Number of partitions 2: (Use \d+ to list them.)

Time: 0.012s
postgres@localhost:postgres> begin;                                         
                               
BEGIN
Time: 0.001s
postgres@localhost:postgres> drop table users;                              
                               
You're about to run a destructive command.
Do you want to proceed? (y/n): y
Your call!
DROP TABLE
Time: 0.002s
postgres@localhost:postgres> commit;   
Connection reset. Reconnect (Y/n):


Server Log:

2019-03-06 14:59:26.101 UTC [61] ERROR:  SMgrRelation hashtable corrupted
2019-03-06 14:59:26.101 UTC [61] STATEMENT:  commit
2019-03-06 14:59:26.101 UTC [61] WARNING:  AbortTransaction while in COMMIT
state
2019-03-06 14:59:26.101 UTC [61] PANIC:  cannot abort transaction 573, it
was already committed
2019-03-06 14:59:26.178 UTC [1] LOG:  server process (PID 61) was terminated
by signal 6: Aborted
2019-03-06 14:59:26.178 UTC [1] DETAIL:  Failed process was running:
commit
2019-03-06 14:59:26.178 UTC [1] LOG:  terminating any other active server
processes
2019-03-06 14:59:26.178 UTC [58] WARNING:  terminating connection because of
crash of another server process
2019-03-06 14:59:26.178 UTC [58] DETAIL:  The postmaster has commanded this
server process to roll back the current transaction and exit, because
another server process exited abnormally and possibly corrupted shared
memory.
2019-03-06 14:59:26.178 UTC [58] HINT:  In a moment you should be able to
reconnect to the database and repeat your command.
2019-03-06 14:59:26.179 UTC [1] LOG:  all server processes terminated;
reinitializing
2019-03-06 14:59:26.186 UTC [68] LOG:  database system was interrupted; last
known up at 2019-03-06 14:58:30 UTC
2019-03-06 14:59:26.212 UTC [68] LOG:  database system was not properly shut
down; automatic recovery in progress
2019-03-06 14:59:26.214 UTC [68] LOG:  redo starts at 0/1650278
2019-03-06 14:59:26.215 UTC [68] FATAL:  SMgrRelation hashtable corrupted
2019-03-06 14:59:26.215 UTC [68] CONTEXT:  WAL redo at 0/16768C8 for
Transaction/COMMIT: 2019-03-06 14:59:26.099739+00; rels: base/13067/16389
base/13067/16387 base/13067/16394 base/13067/16387; inval msgs: catcache 41
catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7
catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6
catcache 7 catcache 6 catcache 50 catcache 49 catcache 19 catcache 32
catcache 7 catcache 6 catcache 7 catcache 6 catcache 50 catcache 49 catcache
74 catcache 73 catcache 74 catcache 73 catcache 7 catcache 6 catcache 7
catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6
catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache
50 catcache 49 catcache 19 catcache 32 catcache 7 catcache 6 catcache 7
catcache 6 catcache 50 catcache 49 catcache 74 catcache 73 catcache 74
catcache 73 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache
6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache
7 catcache 6 catcache 7 catcache 6 catcache 50 catcache 49 catcache 19
catcache 32 catcache 7 catcache 6 catcache 7 catcache 6 catcache 50 catcache
49 catcache 74 catcache 73 catcache 74 catcache 73 relcache 16384 snapshot
2608 snapshot 2608 relcache 16399 relcache 16384 snapshot 2608 snapshot 2608
snapshot 2608 relcache 16389 relcache 16384 snapshot 2608 snapshot 2608
relcache 16401 relcache 16389 snapshot 2608 snapshot 2608 snapshot 2608
relcache 16394 relcache 16384 snapshot 2608 snapshot 2608 relcache 16403
relcache 16394 snapshot 2608 snapshot 2608 snapshot 2608
2019-03-06 14:59:26.216 UTC [1] LOG:  startup process (PID 68) exited with
exit code 1
2019-03-06 14:59:26.216 UTC [1] LOG:  aborting startup due to startup
process failure
2019-03-06 14:59:26.217 UTC [1] LOG:  database system is shut down


Affected Server Version:

11.1
11.2

Messages

DateAuthorSubject
2019-03-06 15:06:53+00PG Bug reporting formBUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-03-07 00:03:16+00Michael PaquierRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-03-07 02:17:11+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-03-07 11:36:02+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-03-08 10:22:46+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-03-27 02:40:12+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-03-27 02:56:20+00Michael PaquierRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-11 06:57:27+00Michael PaquierRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-11 06:58:55+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-23 22:03:05+00Tom LaneRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-24 01:30:55+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-24 23:27:10+00Tom LaneRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-25 02:21:41+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-25 10:02:12+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-25 13:46:23+00Alvaro HerreraRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-25 14:45:53+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-26 03:52:40+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-26 15:39:21+00Alvaro HerreraRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-26 18:57:49+00Tom LaneRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-04-26 21:21:46+00Tom LaneRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table
2019-05-07 08:10:34+00Amit LangoteRe: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table