pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Per SQL spec (in particular, the grammar in SQL:2008 7.13) we
3+ messages / 2 participants
[nested] [flat]

* pgsql: Per SQL spec (in particular, the grammar in SQL:2008 7.13) we
@ 2009-07-06 02:58 Tom Lane <tgl@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: tgl@postgresql.org @ 2009-07-06 02:58 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow
parentheses around the <query expression body> that follows a WITH clause, eg
	with cte(foo) as ( values(0) ) ((select foo from cte));
This seems to be just an oversight/thinko in gram.y.  Noted while
experimenting with bug #4902.

Modified Files:
--------------
    pgsql/src/backend/parser:
        gram.y (r2.665 -> r2.666)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.665&r2=2.666)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Per SQL spec (in particular, the grammar in SQL:2008 7.13) we
@ 2009-07-06 02:58 Tom Lane <tgl@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: tgl@postgresql.org @ 2009-07-06 02:58 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow
parentheses around the <query expression body> that follows a WITH clause, eg
	with cte(foo) as ( values(0) ) ((select foo from cte));
This seems to be just an oversight/thinko in gram.y.  Noted while
experimenting with bug #4902.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/parser:
        gram.y (r2.665 -> r2.665.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.665&r2=2.665.2.1)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Confine vacuum skip logic to lazy_scan_skip()
@ 2024-03-11 18:46 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 3+ messages in thread

From: Heikki Linnakangas @ 2024-03-11 18:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Confine vacuum skip logic to lazy_scan_skip()

Rename lazy_scan_skip() to heap_vac_scan_next_block() and move more
code into the function, so that the caller doesn't need to know about
ranges or skipping anymore. heap_vac_scan_next_block() returns the
next block to process, and the logic for determining that block is all
within the function. This makes the skipping logic easier to
understand, as it's all in the same function, and makes the calling
code easier to understand as it's less cluttered. The state variables
needed to manage the skipping logic are moved to LVRelState.

heap_vac_scan_next_block() now manages its own VM buffer separately
from the caller's vmbuffer variable. The caller's vmbuffer holds the
VM page for the current block its processing, while
heap_vac_scan_next_block() keeps a pin on the VM page for the next
unskippable block. Most of the time they are the same, so we hold two
pins on the same buffer, but it's more convenient to manage them
separately.

For readability inside heap_vac_scan_next_block(), move the logic of
finding the next unskippable block to separate function, and add some
comments.

This refactoring will also help future patches to switch to using a
streaming read interface, and eventually AIO
(https://postgr.es/m/CA%2BhUKGJkOiOCa%2Bmag4BF%2BzHo7qo%3Do9CFheB8%3Dg6uT5TUm2gkvA%40mail.gmail.com)

Author: Melanie Plageman, Heikki Linnakangas
Reviewed-by: Andres Freund (older version)
Discussion: https://postgr.es/m/CAAKRu_Yf3gvXGcCnqqfoq0Q8LX8UM-e-qbm_B1LeZh60f8WhWA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4e76f984a7730cde81e2cfc015de6c2b3dadca99

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 239 ++++++++++++++++++++++-------------
1 file changed, 150 insertions(+), 89 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2024-03-11 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-06 02:58 pgsql: Per SQL spec (in particular, the grammar in SQL:2008 7.13) we Tom Lane <tgl@postgresql.org>
2009-07-06 02:58 pgsql: Per SQL spec (in particular, the grammar in SQL:2008 7.13) we Tom Lane <tgl@postgresql.org>
2024-03-11 18:46 pgsql: Confine vacuum skip logic to lazy_scan_skip() Heikki Linnakangas <heikki.linnakangas@iki.fi>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox