diff options
Diffstat (limited to '')
-rw-r--r-- | src/include/access/tableam.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_opclass.dat | 7 | ||||
-rw-r--r-- | src/include/executor/functions.h | 6 | ||||
-rw-r--r-- | src/include/lib/simplehash.h | 3 | ||||
-rw-r--r-- | src/include/nodes/execnodes.h | 4 | ||||
-rw-r--r-- | src/include/port/win32/sys/socket.h | 8 | ||||
-rw-r--r-- | src/include/storage/lmgr.h | 2 | ||||
-rw-r--r-- | src/include/utils/catcache.h | 5 |
8 files changed, 35 insertions, 4 deletions
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h index ac7b279..5e195fd 100644 --- a/src/include/access/tableam.h +++ b/src/include/access/tableam.h @@ -617,8 +617,8 @@ typedef struct TableAmRoutine const RelFileLocator *newrlocator); /* See table_relation_copy_for_cluster() */ - void (*relation_copy_for_cluster) (Relation NewTable, - Relation OldTable, + void (*relation_copy_for_cluster) (Relation OldTable, + Relation NewTable, Relation OldIndex, bool use_sort, TransactionId OldestXmin, diff --git a/src/include/catalog/pg_opclass.dat b/src/include/catalog/pg_opclass.dat index c867d99..e4a17e4 100644 --- a/src/include/catalog/pg_opclass.dat +++ b/src/include/catalog/pg_opclass.dat @@ -91,8 +91,11 @@ # Here's an ugly little hack to save space in the system catalog indexes. # btree doesn't ordinarily allow a storage type different from input type; # but cstring and name are the same thing except for trailing padding, -# and we can safely omit that within an index entry. So we declare the -# btree opclass for name as using cstring storage type. +# so we choose to omit that within an index entry. Here we declare the +# btree opclass for name as using cstring storage type. This does require +# that we pad the cstring out with the full NAMEDATALEN bytes when performing +# index-only scans. See corresponding hacks in ExecInitIndexOnlyScan() and +# StoreIndexTuple(). { opcmethod => 'btree', opcname => 'name_ops', opcfamily => 'btree/text_ops', opcintype => 'name', opckeytype => 'cstring' }, diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index 5d9f325..5370243 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -50,6 +50,12 @@ extern bool check_sql_fn_retval(List *queryTreeLists, bool insertDroppedCols, List **resultTargetList); +extern bool check_sql_fn_retval_ext(List *queryTreeLists, + Oid rettype, TupleDesc rettupdesc, + char prokind, + bool insertDroppedCols, + List **resultTargetList); + extern DestReceiver *CreateSQLFunctionDestReceiver(void); #endif /* FUNCTIONS_H */ diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h index b7adc16..1dc817a 100644 --- a/src/include/lib/simplehash.h +++ b/src/include/lib/simplehash.h @@ -1101,6 +1101,9 @@ SH_STAT(SH_TYPE * tb) max_collisions = curcoll; } + /* large enough to be worth freeing, even if just used for debugging */ + pfree(collisions); + if (tb->members > 0) { fillfactor = tb->members / ((double) tb->size); diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 869465d..49419f1 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -1600,6 +1600,8 @@ typedef struct IndexScanState * TableSlot slot for holding tuples fetched from the table * VMBuffer buffer in use for visibility map testing, if any * PscanLen size of parallel index-only scan descriptor + * NameCStringAttNums attnums of name typed columns to pad to NAMEDATALEN + * NameCStringCount number of elements in the NameCStringAttNums array * ---------------- */ typedef struct IndexOnlyScanState @@ -1619,6 +1621,8 @@ typedef struct IndexOnlyScanState TupleTableSlot *ioss_TableSlot; Buffer ioss_VMBuffer; Size ioss_PscanLen; + AttrNumber *ioss_NameCStringAttNums; + int ioss_NameCStringCount; } IndexOnlyScanState; /* ---------------- diff --git a/src/include/port/win32/sys/socket.h b/src/include/port/win32/sys/socket.h index 0c32c0f..f2b475d 100644 --- a/src/include/port/win32/sys/socket.h +++ b/src/include/port/win32/sys/socket.h @@ -23,4 +23,12 @@ #define ERROR PGERROR #endif +/* + * We don't use the Windows gai_strerror[A] function because it is not + * thread-safe. We define our own in src/port/win32gai_strerror.c. + */ +#undef gai_strerror + +extern const char *gai_strerror(int ecode); + #endif /* WIN32_SYS_SOCKET_H */ diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index 4ee91e3..8ab833d 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -93,6 +93,8 @@ extern void SpeculativeInsertionWait(TransactionId xid, uint32 token); /* Lock a general object (other than a relation) of the current database */ extern void LockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode); +extern bool ConditionalLockDatabaseObject(Oid classid, Oid objid, + uint16 objsubid, LOCKMODE lockmode); extern void UnlockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode); diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index af0b341..a32d722 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -62,6 +62,11 @@ typedef struct catcache ScanKeyData cc_skey[CATCACHE_MAXKEYS]; /* precomputed key info for heap * scans */ + /* These fields are placed here to avoid ABI breakage in v16 */ + int cc_nlist; /* # of CatCLists currently in this cache */ + int cc_nlbuckets; /* # of CatCList hash buckets in this cache */ + dlist_head *cc_lbucket; /* hash buckets for CatCLists */ + /* * Keep these at the end, so that compiling catcache.c with CATCACHE_STATS * doesn't break ABI for other modules |