FS#36592 - [postfix] remove db support

Attached to Project: Arch Linux
Opened by Gaetan Bisson (vesath) - Monday, 19 August 2013, 06:17 GMT
Last edited by Gaetan Bisson (vesath) - Thursday, 22 August 2013, 19:34 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Andreas Radke (AndyRTR)
Gaetan Bisson (vesath)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

We currently build postfix with Berkeley DB support. This library will slowly become deprecated in favor of Oracle DB 6. For postfix, we have a choice:
- Build postfix against Oracle DB 6 and hope for minimal maintenance burden (upstream preserves compatibility, etc.)
- Remove DB support from postfix.

Currently DB support is used in postfix for the btree and hash database types. Upgrading to a postfix without db support requires manual intervention from all users to switch to an alternative database type (which our postfix already supports, such as cdb). This takes two steps:
- Recreate database files in cdb format (for instance, running "postmap cdb:virtual" yields virtual.cdb)
- Update main.cf to use "cdb:virtual.cdb" instead of "hash:virtual.db" (and other entries using hash/btree)

Is this worth it?

Personally I would be happier not using any Oracle product, but I would like to know whether other devs think it is worth the migration cost.
This task depends upon

Closed by  Gaetan Bisson (vesath)
Thursday, 22 August 2013, 19:34 GMT
Reason for closing:  Deferred
Comment by zless (roentgen) - Monday, 19 August 2013, 07:17 GMT
Sorry if I'm not very informed on the file formats right now.

I see in my main.cf that there's a line
alias_maps = hash:/etc/aliases

Is that using db? When I try to convert it with postmap cdb:aliases there are lots of errors:

postmap: warning: aliases, line 12: record is in "key: value" format; is this an alias file?

What do you think about it?
Comment by Gaetan Bisson (vesath) - Monday, 19 August 2013, 08:10 GMT
See the man page of postmap: hash implicitely uses db. And for alias files, you should use postalias...
Comment by Florian Pritz (bluewind) - Tuesday, 20 August 2013, 12:05 GMT
So using cdb for read-only dbs sounds like a good idea, but what about rw dbs like the tls session caches or the verify cache? From what I read cdb has to be recreated from scratch on update so that probably hurts performance on bigger systems.
Comment by Gaetan Bisson (vesath) - Tuesday, 20 August 2013, 13:14 GMT
Good point. When building with -DNO_DB, the default values for smtp_tls_session_cache_database and address_verify_map are the same: the former is empty, but the latter still uses a btree (implying Berkeley/Oracle DB).
I'm not sure how postfix is supposed to work then. One can set address_verify_map to the empty string to make postfix store the cache in RAM. Obviously all this is not ideal...
Comment by Gaetan Bisson (vesath) - Thursday, 22 August 2013, 19:34 GMT
Alright. We keep DB for now.

Loading...