SCM

[#1011203] pg_reorg can't complete on promoted slave

View Trackers | Bugs | Download .csv | Monitor

Date:
2012-06-09 03:19
Priority:
3
State:
Open
Submitted by:
Jeff Frost (jeffroe996)
Assigned to:
Nobody (None)
Category:
Group:
Resolution:
None
 
Summary:
pg_reorg can't complete on promoted slave

Detailed description
I've seen this issue on two systems. The postgresql server in question was a 9.1.3 streaming replica which was brought up as a master.

pg_reorg starts fine, gets the initial locks, creates the trigger, then does the SELECT INTO, creates all the indexes,then can't complete because it always finds a long running transaction.

If you go look in pg_locks, you find this:

locktype | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted
------------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-------+---------------+---------
virtualxid | | | | | 1/1 | | | | | -1/0 | 5232 | ExclusiveLock | t

If you look for that in pg_stat_activity, you won't find it:

select * from pg_stat_activity where procpid = 5232;
datid | datname | procpid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start | query_start | waiting | cur
rent_query
-------+---------+---------+----------+---------+------------------+-------------+-----------------+-------------+---------------+------------+-------------+---------+----
-----------
(0 rows)

because that PID is actually the WAL Writer!

ps -ef|grep 5232
postgres 5232 10545 0 May28 ? 00:00:01 postgres: wal writer process


Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge