mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +03:00
AUTOCOMMIT mode is now an available backend GUC variable; setting it
to false provides more SQL-spec-compliant behavior than we had before. I am not sure that setting it false is actually a good idea yet; there is a lot of client-side code that will probably be broken by turning autocommit off. But it's a start. Loosely based on a patch by David Van Wie.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.85 2002/08/29 15:56:20 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.86 2002/08/30 22:18:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -735,15 +735,16 @@ ReindexDatabase(const char *dbname, bool force, bool all)
|
||||
heap_close(relationRelation, AccessShareLock);
|
||||
|
||||
/* Now reindex each rel in a separate transaction */
|
||||
CommitTransactionCommand();
|
||||
CommitTransactionCommand(true);
|
||||
for (i = 0; i < relcnt; i++)
|
||||
{
|
||||
StartTransactionCommand();
|
||||
StartTransactionCommand(true);
|
||||
if (reindex_relation(relids[i], force))
|
||||
elog(NOTICE, "relation %u was reindexed", relids[i]);
|
||||
CommitTransactionCommand();
|
||||
CommitTransactionCommand(true);
|
||||
}
|
||||
StartTransactionCommand();
|
||||
/* Tell xact.c not to chain the upcoming commit */
|
||||
StartTransactionCommand(true);
|
||||
|
||||
MemoryContextDelete(private_context);
|
||||
}
|
||||
|
Reference in New Issue
Block a user