Skip to content

Commit d43b085

Browse files
committed
Separate snapshot management code from tuple visibility code, create a
snapmgmt.c file for the former. The header files have also been reorganized in three parts: the most basic snapshot definitions are now in a new file snapshot.h, and the also new snapmgmt.h keeps the definitions for snapmgmt.c. tqual.h has been reduced to the bare minimum. This patch is just a first step towards managing live snapshots within a transaction; there is no functionality change. Per my proposal to pgsql-patches on 20080318191940.GB27458@alvh.no-ip.org and subsequent discussion.
1 parent 2d7705e commit d43b085

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+345
-258
lines changed

src/backend/access/heap/heapam.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.251 2008/03/08 21:57:59 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.252 2008/03/26 16:20:46 alvherre Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -56,6 +56,7 @@
5656
#include "utils/inval.h"
5757
#include "utils/lsyscache.h"
5858
#include "utils/relcache.h"
59+
#include "utils/snapmgmt.h"
5960
#include "utils/syscache.h"
6061

6162

src/backend/access/index/indexam.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.101 2008/01/01 19:45:46 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.102 2008/03/26 16:20:46 alvherre Exp $
1212
*
1313
* INTERFACE ROUTINES
1414
* index_open - open an index relation by relation OID
@@ -67,6 +67,7 @@
6767
#include "access/transam.h"
6868
#include "pgstat.h"
6969
#include "utils/relcache.h"
70+
#include "utils/snapmgmt.h"
7071

7172

7273
/* ----------------------------------------------------------------

src/backend/access/nbtree/nbtpage.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.106 2008/01/01 19:45:46 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtpage.c,v 1.107 2008/03/26 16:20:46 alvherre Exp $
1313
*
1414
* NOTES
1515
* Postgres btree pages look like ordinary relation pages. The opaque
@@ -28,6 +28,7 @@
2828
#include "storage/freespace.h"
2929
#include "storage/lmgr.h"
3030
#include "utils/inval.h"
31+
#include "utils/snapmgmt.h"
3132

3233

3334
/*

src/backend/access/transam/subtrans.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
2323
* Portions Copyright (c) 1994, Regents of the University of California
2424
*
25-
* $PostgreSQL: pgsql/src/backend/access/transam/subtrans.c,v 1.20 2008/01/01 19:45:48 momjian Exp $
25+
* $PostgreSQL: pgsql/src/backend/access/transam/subtrans.c,v 1.21 2008/03/26 16:20:46 alvherre Exp $
2626
*
2727
*-------------------------------------------------------------------------
2828
*/
@@ -31,7 +31,7 @@
3131
#include "access/slru.h"
3232
#include "access/subtrans.h"
3333
#include "access/transam.h"
34-
#include "utils/tqual.h"
34+
#include "utils/snapmgmt.h"
3535

3636

3737
/*

src/backend/access/transam/transam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/transam/transam.c,v 1.74 2008/03/11 20:20:35 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/transam/transam.c,v 1.75 2008/03/26 16:20:46 alvherre Exp $
1212
*
1313
* NOTES
1414
* This file contains the high level access-method interface to the
@@ -22,7 +22,7 @@
2222
#include "access/clog.h"
2323
#include "access/subtrans.h"
2424
#include "access/transam.h"
25-
#include "utils/tqual.h"
25+
#include "utils/snapmgmt.h"
2626

2727

2828
/*

src/backend/access/transam/xact.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.260 2008/03/17 19:44:41 petere Exp $
13+
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.261 2008/03/26 16:20:46 alvherre Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -45,6 +45,7 @@
4545
#include "utils/inval.h"
4646
#include "utils/memutils.h"
4747
#include "utils/relcache.h"
48+
#include "utils/snapmgmt.h"
4849
#include "utils/xml.h"
4950
#include "pg_trace.h"
5051

src/backend/catalog/catalog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.73 2008/02/20 17:44:09 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.74 2008/03/26 16:20:46 alvherre Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -38,6 +38,7 @@
3838
#include "storage/fd.h"
3939
#include "utils/fmgroids.h"
4040
#include "utils/relcache.h"
41+
#include "utils/tqual.h"
4142

4243

4344
#define OIDCHARS 10 /* max chars printed by %u */

src/backend/catalog/heap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.328 2008/03/25 22:42:42 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.329 2008/03/26 16:20:46 alvherre Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -60,6 +60,7 @@
6060
#include "utils/lsyscache.h"
6161
#include "utils/relcache.h"
6262
#include "utils/syscache.h"
63+
#include "utils/snapmgmt.h"
6364

6465

6566
static void AddNewRelationTuple(Relation pg_class_desc,

src/backend/catalog/index.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/index.c,v 1.293 2008/03/25 22:42:42 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/index.c,v 1.294 2008/03/26 16:20:46 alvherre Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -55,6 +55,7 @@
5555
#include "utils/relcache.h"
5656
#include "utils/syscache.h"
5757
#include "utils/tuplesort.h"
58+
#include "utils/snapmgmt.h"
5859

5960

6061
/* state info for validate_index bulkdelete callback */

src/backend/commands/cluster.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.169 2008/01/30 19:46:48 tgl Exp $
14+
* $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.170 2008/03/26 16:20:46 alvherre Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -41,6 +41,7 @@
4141
#include "utils/lsyscache.h"
4242
#include "utils/memutils.h"
4343
#include "utils/relcache.h"
44+
#include "utils/snapmgmt.h"
4445
#include "utils/syscache.h"
4546

4647

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy