[Pdns-users] Duplicate RRs in records table

Klaus Darilion klaus.mailinglists at pernau.at
Mon Oct 20 12:19:23 UTC 2014

On 11.10.2014 21:37, Stephen Frost wrote:
> * Peter van Dijk (peter.van.dijk at netherlabs.nl) wrote:
>> On 03 Jul 2014, at 16:04 , Klaus Darilion <klaus.mailinglists at pernau.at> wrote:
>>> I also think that performing multiple transfers for the same zone should
>>> be avoided in the application.
>> Please file a ticket at https://github.com/PowerDNS/pdns/issues/new so we don’t forget!
> This doesn't appear to have been addressed in 3.4.0- was the bug ever
> submitted and is there a plan to fix it..?

As a workaround we regularly check for duplicates and then re-transfer a
zone if duplicates were found:

// Get the zones which have duplicate records
$dbq = pg_query("SELECT name FROM (".
                "  SELECT name,COUNT(type) AS count,content FROM records
WHERE type='SOA' GROUP BY name,content".
                ") AS query1 ".
                "WHERE count > 1 ORDER BY count desc;");

// Fetch every affected zone
while ($row = pg_fetch_object($dbq)) {
	// calling pdns_control retrieve <zone>
$row->name, &$status);


More information about the Pdns-users mailing list