Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kirYp-0003f0-G3 for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Nov 2020 04:10:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kirYn-0001xL-R2 for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Nov 2020 04:10:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kirYn-0001xE-Kk for pgsql-bugs@lists.postgresql.org; Sat, 28 Nov 2020 04:10:09 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kirYl-0000yV-G4 for pgsql-bugs@lists.postgresql.org; Sat, 28 Nov 2020 04:10:08 +0000 Received: by mail-pf1-x432.google.com with SMTP id t8so6127892pfg.8 for ; Fri, 27 Nov 2020 20:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wJ3qT+4USHmgQc8FYkFYCJHDtaS8NTTUToX75j5aI2Q=; b=guXzzQbYVxWQ+MkpS2nyB81j5NjEZd4vEtMAxNGR2/e3cKFt98wetV4YdyUA76Vs8J 9jksBoDYTEKDX66iqskIIQoHeQKIF24y1j5LiL8HaPHi0g/N6dgb3k5mzhqz3ypZI7R5 vn4rvuKwyOb90buyZhDvLqoooeB1h1YCRpqE0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wJ3qT+4USHmgQc8FYkFYCJHDtaS8NTTUToX75j5aI2Q=; b=UCwnN5BwwUgDXSDK5sF+4LVeiyFVE1092EUs0uoDVpaFP+GIlr1UeghvYBZamuvYQl Y5cZ7ZcMjd+bw8x7e8qz92KrEb8SAnr1nInjCpsBgSlgDXqnFzVg0XKbBixWp2xYjTuV 0ODASOOTsTUcAcGwY54lYHK3fK4iDRCNDlFCKMuMIgFgQpbSb8r30XfkXMPx+0E/Sb5P 8GcWHU++ytMiY4Nr4CkWvhJOdwbXBQtXextUPTUBhiIp0HsRu8a+vBwqO1U7f6AXW5nT ZxXffelYCULNl45d4ZsFUDwCBq2KfOQv+C8R18ZB8TplkSNC8wIS/FXFHurP/ncj3bv3 osNw== X-Gm-Message-State: AOAM5302xWoLP0feKvdvNYau8VA0QDnfRr7cXRoFDECQ2mx46BaFm1lC rfNN9ZD8nzCo5vDR7STt6j5wI/rczZl44Q== X-Google-Smtp-Source: ABdhPJybuig5GaTGFZZWpWD8v7W0xaLGELtcYR/QzRAmIVuhlbvKhWbCJHoLl+ii5sHzQQyJ5RLVKw== X-Received: by 2002:a05:6a00:16c4:b029:198:a95:a2ef with SMTP id l4-20020a056a0016c4b02901980a95a2efmr9979405pfc.43.1606536604893; Fri, 27 Nov 2020 20:10:04 -0800 (PST) Received: from rfd.leadboat.com ([2600:1702:a20:5750::43]) by smtp.gmail.com with ESMTPSA id m7sm9410607pfh.72.2020.11.27.20.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Nov 2020 20:10:04 -0800 (PST) Date: Fri, 27 Nov 2020 20:10:01 -0800 From: Noah Misch To: Tom Lane Cc: Gustavsson Mikael , pgsql-bugs@lists.postgresql.org, Svensson Peter , Almen Anders Subject: Re: SV: Problem with pg_notify / listen Message-ID: <20201128041001.GB556656@rfd.leadboat.com> References: <1b8561412e8a4f038d7a491c8b922788@smhi.se> <704331.1606490493@sss.pgh.pa.us> <6c10dcdd2eb64bbab4814e4f2abd5ab4@smhi.se> <7a0df07fb3f94dfe80839942ab5993c7@smhi.se> <716909.1606498665@sss.pgh.pa.us> <730247.1606515208@sss.pgh.pa.us> <20201128035906.GA556656@rfd.leadboat.com> <744927.1606536220@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <744927.1606536220@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Nov 27, 2020 at 11:03:40PM -0500, Tom Lane wrote: > Noah Misch writes: > > I think we don't yet have the right name here, seeing QUEUE_TAIL_PAGE != > > QUEUE_POS_PAGE(QUEUE_TAIL) sounds paradoxical, yet happens regularly. How > > about naming it QUEUE_STOP_PAGE? > > Hmm, it's not very clear what "stop" means here. What do you think of > QUEUE_OLDEST_PAGE? "STOP" would mean the same kind of thing it means in xidStopLimit, multiStopLimit and offsetStopLimit. Interpreted for pg_notify specifically, it would mean "if queueing a notification would require use of this page, throw an error." QUEUE_OLDEST_PAGE is fine. I like it a little less than QUEUE_STOP_PAGE, because oldestClogXid is a logical tail, and QUEUE_OLDEST_PAGE would be a physical tail.