Info request: pihole-FTL.db

I can confirm the solution works perfectly with an alias client, based on the mac address and the mac address 00:00:00:00:00:00 (localhost 127.0.0.1 and ::1)

I have some follow up questions:

  1. Which entry is added first by pihole-FTL, the entry (IP address) in the nework_addresses table OR the entry (ip-IP address in the network table?

For my script, that modifies the aliasclient_id in the network table, i want to test if the entry already exists, before executing the update statement. Knowing the order these entries are added, would eliminate on of the tests.

  1. in this topic, you mentioned the command sudo -u pihole sqlite3 /etc/pihole/gravity.db "BEGIN EXCLUSIVE;COMMIT"

I've trying to read up on this, but don't fully understand the impact and usage. Is this something that would be usable / recommended in scripts to eliminate the "database is locked" problem?

  1. I'm now using both pkill -RTMIN+4 pihole-FTL (force name update in network_addresses table) and pkill -RTMIN+3 pihole-FTL (force alias client update).

Is there a preferred order to send these signals (currently using 4, than 3 in my script)?

As always, thank you for your time and effort, much appreciated.