title: Can't immediately receive multiple notifications in Npgsql
body: <p>Today i wrote the following code that works with PostgreSQL C# library named Npgsql:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Npgsql;
  
  namespace PostgreSQLNotificationsTest
  {
      class Program
      {
          static void Main(string[] args)
          {
              using (var conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;User Id=postgres;Password=my_password;Database=helper_db.psql;SyncNotification=true"))
              {
                  conn.Notification += OnNotification;
                  conn.Open();
                  using (var command = new NpgsqlCommand("listen notifytest;", conn))
                  {
                      command.ExecuteNonQuery();
                  }
                  Console.ReadLine();
              };
          }
  
          private static void OnNotification(object sender, NpgsqlNotificationEventArgs e)
          {
              Console.WriteLine("event handled: " + e.AdditionalInformation);
          }
      }
  }
  </code></pre>
  
  <p>Then i do the following</p>
  
  <blockquote>
    <p>createdb.exe -h 127.0.0.1 -p 5432 -U postgres -W helper_db.psql</p>
    
    <p>psql.exe -h 127.0.0.1 -p 5432 -U postgres -W helper_db.psql</p>
    
    <p>create table helper(first text primary key, second integer);</p>
  </blockquote>
  
  <pre><code>CREATE OR REPLACE FUNCTION nf() RETURNS TRIGGER AS $$
  BEGIN
      PERFORM pg_notify('notifytest', format('INSERT %s %s', NEW.first, NEW.second));
      RETURN NULL;
  END;
  $$ LANGUAGE plpgsql;
  
  CREATE TRIGGER any_after AFTER INSERT OR UPDATE OR DELETE ON helper FOR EACH ROW EXECUTE PROCEDURE nf();
  </code></pre>
  
  <blockquote>
    <p>insert into helper values('first', 10), ('second', 20);</p>
  </blockquote>
  
  <p>In C# project i get the following output:</p>
  
  <blockquote>
    <p>event handled: INSERT first 10</p>
  </blockquote>
  
  <p>There's no "event handled: INSERT second 20". Only when i do the next operation like "delete from helper", i receive it.</p>
  
  <p>Why?</p>