On 04/20/2011 05:48 AM, Bruce Momjian wrote:
Robert Haas wrote:
pgindent seems to have muffed it when it comes to BulkInsertStateData:
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c
index 2849992..72a69e5 100644
--- a/src/backend/access/heap/hio.c
+++ b/src/backend/access/heap/hio.c
@@ -150,7 +150,7 @@ ReadBufferBI(Relation relation, BlockNumber targetBlock,
Buffer
RelationGetBufferForTuple(Relation relation, Size len,
Buffer otherBuffer,
int options,
- struct
BulkInsertStateData *bistate)
+ struct
BulkInsertStateData * bistate)
{
bool use_fsm = !(options& HEAP_INSERT_SKIP_FSM);
Buffer buffer = InvalidBuffer;
Not sure what happened here exactly...
BulkInsertStateData is not listed in the typedef list supplied by
Andrew; see src/tools/pgindent/typedefs.list. CC'ing him. This might
be because the typdef is listed in two files:
/*
* state for bulk inserts --- private to heapam.c and hio.c
*
* If current_buf isn't InvalidBuffer, then we are holding an extra pin
* on that buffer.
*
* "typedef struct BulkInsertStateData *BulkInsertState" is in heapam.h
*/
It's tagged as a structure type by objdump, but not as a typedef:
<1><40055>: Abbrev Number: 4 (DW_TAG_typedef)
<40056> DW_AT_name : (indirect string, offset: 0x6bf6):
BulkInsertState
<4005a> DW_AT_decl_file : 30
<4005b> DW_AT_decl_line : 32
<4005c> DW_AT_type : <0x40060>
<1><40060>: Abbrev Number: 7 (DW_TAG_pointer_type)
<40061> DW_AT_byte_size : 8
<40062> DW_AT_type : <0x40066>
<1><40066>: Abbrev Number: 13 (DW_TAG_structure_type)
<40067> DW_AT_name : (indirect string, offset: 0x66bf):
BulkInsertStateData
<4006b> DW_AT_byte_size : 16
<4006c> DW_AT_decl_file : 31
<4006d> DW_AT_decl_line : 30
<4006e> DW_AT_sibling : <0x4008b>
I can pull out those too if you want them in the list, but it would
possibly add a LOT of names to the list.
I did carefully warn you about the need to check the effects of the
changes when I committed the new list.
It looks like quite a few of the deletions come into this category, for
example just looking at the diff here
<https://github.com/postgres/postgres/commit/fe1438da8aa8a45f2cee816eb54841f97d3b2f22#src/tools/pgindent/typedefs.list>
I see AggHashEntryData, AggStatePerAggData, AllocBlockData, and
AllocChunkData from among the first few that were deleted and all are in
the same category.
I wondered if this is some sort of optimizer effect, but building with
-O0 doesn't seem to affect it.
Note that the list we're using is a composite of dumps from four
platforms: Linux, FreeBSD, MinGW and Cygwin. What they have in common is
that they are all using gcc, and a fairly modern version of gcc at that,
and fairly modern versions of objdump too.
Attached is a partial list of new candidate symbols if we want to pick
up these extras.
cheers
andrew
addrinfo
aff_struct
AggHashEntryData
AggStatePerAggData
AllocBlockData
AllocChunkData
arc
arcbatch
arcp
ArrayIteratorData
ASIdentifiers_st
ASN1_ENCODING_st
asn1_object_st
asn1_string_st
asn1_type_st
ASN1_VALUE_st
attrDefault
AUTHORITY_KEYID_st
BgWriterSlotMapping
bignum_ctx
bignum_st
bio_method_st
bio_st
bkend
bn_blinding_st
bn_gencb_st
bn_mont_ctx_st
BufferAccessStrategyData
buf_mem_st
buftag
BulkInsertStateData
cachedesc
carc
catcache
catcacheheader
catclist
catctup
cert_st
cname
cnfa
colordesc
colormap
colors
comp_ctx_st
comp_method_st
config_bool
config_enum
config_enum_entry
config_generic
config_int
config_real
config_string
ConnectionOption
constrCheck
crypto_ex_data_st
cvec
_DestReceiver
dfa
df_files
dh_method
dh_st
dirent
__dirstream
dropmsgstrings
dsa_method
DSA_SIG_st
dsa_st
dtls1_bitmap_st
dtls1_retransmit_state
dtls1_state_st
dtls1_timeout_st
encoding_match
engine_st
env_md_ctx_st
env_md_st
evp_cipher_ctx_st
evp_cipher_st
evp_pkey_asn1_method_st
evp_pkey_ctx_st
evp_pkey_st
fmgr_security_definer_cache
fns
fp_info
_FuncCandidateList
GinScanEntryData
GinScanKeyData
GlobalTransactionData
group
gss_buffer_desc_struct
gss_channel_bindings_struct
gss_cred_id_struct
gss_ctx_id_struct
gss_name_struct
gss_OID_desc_struct
guc_stack
guts
HashJoinTableData
HashJoinTupleData
HeapScanDescData
hmac_ctx_st
hm_header_st
ifaddrs
in6_addr
in_addr
_IndexList
IndexScanDescData
_IO_FILE
_IO_marker
ipc_perm
ISSUING_DIST_POINT_st
itimerval
__jmp_buf_tag
kssl_ctx_st
lconv
lc_time_T
ldap
ldapmsg
lhash_st_SSL_SESSION
__locale_data
__locale_struct
lsinfo
mbinterval
_MdfdVec
MergeJoinClauseData
NAME_CONSTRAINTS_st
nameData
nfa
NumericData
NumericLong
NumericShort
OldSerXidControlData
ONEXIT
opclasscacheent
pam_conv
pam_handle
pam_message
pam_response
ParamListInfoData
passwd
pg_encoding
pg_tm
pollfd
PortalData
portalhashent
_pqueue
PredXactListData
PredXactListElementData
ptrs
record_pqueue_st
RELCACHECALLBACK
relidcacheent
rerr
ResourceOwnerData
RewriteStateData
rlimit
rsa_meth_st
rsa_st
rule
rusage
RWConflictData
RWConflictPoolHeaderData
sbufdesc
sembuf
semid_ds
sess_cert_st
SetOpHashEntryData
shmid_ds
sigaction
siginfo
smalldfa
sockaddr
sockaddr_in
sockaddr_in6
sockaddr_storage
sockaddr_un
spell_struct
SQLFunctionParseInfo
sset
ssl2_state_st
ssl3_buffer_st
ssl3_buf_freelist_st
ssl3_enc_method
ssl3_record_st
ssl3_state_st
ssl_cipher_st
ssl_comp_st
ssl_ctx_st
ssl_method_st
ssl_session_st
ssl_st
stack_st
stack_st_ASN1_OBJECT
stack_st_DIST_POINT
stack_st_GENERAL_NAME
stack_st_GENERAL_NAMES
stack_st_IPAddressFamily
stack_st_OCSP_RESPID
stack_st_SSL_CIPHER
stack_st_SSL_COMP
stack_st_void
stack_st_X509
stack_st_X509_ALGOR
stack_st_X509_ATTRIBUTE
stack_st_X509_CRL
stack_st_X509_EXTENSION
stack_st_X509_LOOKUP
stack_st_X509_NAME
stack_st_X509_NAME_ENTRY
stack_st_X509_OBJECT
stack_st_X509_REVOKED
stat
state
subre
SYSCACHECALLBACK
SysScanDescData
timespec
timeval
tls_session_ticket_ext_st
tm
TSQueryParserStateData
TSVectorParseStateData
ttinfo
tupleConstr
tupleDesc
TupleHashTableData
typinfo
typmap
tzhead
tztry
ucred
__va_list_tag
varatt_external
varlena
vars
vfd
WindowStatePerFuncData
WorkerInfoData
X509_algor_st
x509_cert_aux_st
x509_cinf_st
X509_crl_info_st
x509_crl_method_st
X509_crl_st
X509_name_st
X509_POLICY_CACHE_st
X509_POLICY_TREE_st
X509_pubkey_st
x509_st
x509_store_ctx_st
x509_store_st
X509_val_st
X509_VERIFY_PARAM_st
XidCache
xllist
_xmlAttr
_xmlAutomata
_xmlAutomataState
_xmlBuffer
_xmlCharEncodingHandler
_xmlChLRange
_xmlChRangeGroup
_xmlChSRange
_xmlDict
_xmlDoc
_xmlDtd
_xmlElementContent
_xmlEntity
_xmlEnumeration
_xmlError
_xmlHashTable
_xmlNode
_xmlNodeSet
_xmlNs
_xmlParserCtxt
_xmlParserInput
_xmlParserInputBuffer
_xmlParserNodeInfo
_xmlParserNodeInfoSeq
_xmlSAXHandler
_xmlSAXLocator
_xmlTextWriter
_xmlValidCtxt
_xmlValidState
_xmlXPathAxis
_xmlXPathCompExpr
_xmlXPathContext
_xmlXPathObject
_xmlXPathParserContext
_xmlXPathType
yy_buffer_state
yyguts_t
yy_trans_info
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers