Search Postgresql Archives

Is it possible that session lock is not released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
    I just found that ShutdownPostgres() only releases USER_LOCKMETHOD locks, so why not
release DEFAULT_LOCKMETHOD locks? Check if this is possible:
    We are doing a CREATE INDEX CONCURRENTLY, and codes runs to

    LockRelationIdForSession(&heaprelid, ShareUpdateExclusiveLock);

    PopActiveSnapshot();
    CommitTransactionCommand();
   
Now transaction goes to default state, then this backend is killed or some FATAL error happens,
AbortOutOfAnyTransaction() in ShutdownPostgres() will do nothing since transaction is in default
state, and session lock on heaprelid is still held after ShutdownPostgres(), so subsequent operations
could be blocked by this session lock.

Thanks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux