I have a Custom Fields Group called 'Listing Fields'. In the site's postmeta table there are multiple meta keys that seem to follow the format wpcf-CUSTOM FIELDS GROUP NAME-CUSTOM POST SLUG-SEQUENTIAL NUMBER. So for example I see the following meta keys:-
wpcf-listing-fields-listing-1
wpcf-listing-fields-listing-2
wpcf-listing-fields-listing-4
The meta values are serialized data consisting of the custom field names for the custom post type.
What's puzzling me is why are there multiple meta keys like this storing exactly the same data and why is a sequential number skipped (in the above list you can see that wpcf-listing-fields-listing-3 doesn't exist).
From a good housekeeping point of view, I need to understand when/why these keys are created, why it's necessary for multiple keys to store the same data, whether any of them can be routinely removed and how do I ascertain which ones are to safe to remove?
I have quite a few sites installed locally, my test sites, and some copies of client sites for open issues I'm working on, some of which are fairly large complex sites.
I performed searches on quite a few of these sites, looking in wp_postmeta for rows with keys matching the pattern you describe (actually, a looser version to be less specific), and found no results, on any of the sites.
I can't say where those entries are coming from on your site.
When you create a custom field group, a post (of type wp_types_group) is created, with details stored in wp_postmeta corresponding to that post, but not with keys in the format you describe.
Have you found these postmeta entries on more than one site, or just a single site?
What kind of posts do these postmeta entries belong to?
Apologies but I've had you looking at the wrong table; the entries are in the options table and they are option names not meta keys. I've seen them on two sites.
OK, I located similar options in the database for my own test sites.
I scanned the Types source code and I can see that these options are used for storing information about which columns to show in the post relationships UI on post edit screens.
So you will see these options on sites where you have set up post relationships, and not on sites that don't have relationships, and it is expected that there may be multiple entries with different number suffixes.
You can see the details in the file types/application/models/post_type/relationship_settings/relationship_settings.php where this is set up.