Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: implement functionality for client_min_messages #44711

Closed
rafiss opened this issue Feb 4, 2020 · 1 comment · Fixed by #46650
Closed

sql: implement functionality for client_min_messages #44711

rafiss opened this issue Feb 4, 2020 · 1 comment · Fixed by #46650
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL

Comments

@rafiss
Copy link
Collaborator

rafiss commented Feb 4, 2020

Currently the client_min_messages session variable is just a reserved word that does not change any functionality.

In Postgres, it has the following behavior:

Controls which message levels are sent to the client. Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, LOG, NOTICE, WARNING, and ERROR. Each level includes all the levels that follow it. The later the level, the fewer messages are sent. The default is NOTICE. Note that LOG has a different rank here than in log_min_messages.

The lack of support is causing AsyncTests.test_notices to fail in psycopg2.

@rafiss rafiss added the A-sql-pgcompat Semantic compatibility with PostgreSQL label Feb 4, 2020
@otan otan self-assigned this Mar 25, 2020
@otan
Copy link
Contributor

otan commented Mar 26, 2020

i don't think we should mirror the debug information output from the index

otan=# create table chatty (id serial primary key);
DEBUG:  CREATE TABLE will create implicit sequence "chatty_id_seq" for serial column "chatty.id"
DEBUG:  CREATE TABLE / PRIMARY KEY will create implicit index "chatty_pkey" for table "chatty"
DEBUG:  building index "chatty_pkey" on table "chatty" serially

as serial is very different for us. i will implement the feature but will not be able to pass the test.

craig bot pushed a commit that referenced this issue Apr 20, 2020
47238: colexec, colflow: fix router output and hash router when disk limit is hit r=yuzefovich a=yuzefovich

**colexec, colflow: make hash router catch panics during cancellation**

Previously, if a panic occurred during the cancellation of hash router's
outputs, it could crash the server because hash routers run in their own
goroutines. This is now fixed by wrapping the cancellation with the
panic-catcher. If any error occurs in that phase, it is buffered to be
propagated as metadata. We also now wrap the whole `Run` method with
a catcher just to be safe.

Addresses: #47203.

Release note: None

**colexec: prevent calls to disk queue in invalid state**

This commit fixes the interaction between hash router and router output
when the latter hits an error. Previously we could end up in a state
where router output's disk queue is invalid, but the hash router doesn't
know about it, so it would proceed to calling `addBatch` which could
attempt to enqueue another batch to the disk queue.

Now we introduce a new draining state of `routerOutputOp` in which it
returns zero-length batches on calls to `Next`. The output transitions
into draining state either when it is finished or when it encounters an
error. That error will be propagated to the hash router either on the
next call to `addBatch` or during draining of the hash router by calling
`routerOutputOp.drain()`.

Additionally, it makes memory accounting of disk queue more safe (by making
sure that we do not attempt to shrink the disk account by more than is
currently used).

Fixes: #47203.

Release note: None

47630: pgerror: add severity concept to pgerror package r=knz a=otan

`pgwire` will need to send down severities which  can be customised by
the developer.

To accomplish this, we introduce severity to the pgerror package, which
includes the helper functions `WithSeverity` and `GetSeverity`.
Developers who specify a severity using WithSeverity will now see that
severity pop up over the wire. The default severity if none is specified
is ERROR.

This has been plugged in for NOTICE using `Noticef`.

Refs: #44711

Release note: None

47695: roachtest: check version before resetting batch size cluster setting r=yuzefovich a=asubiotto

This roachtest would previously attempt to set a cluster setting which did not
exist in 19.2.

Release note: None (testing change)

Fixes #47675 

47696: server: fix an invalid error unwrap r=tbg a=knz

Found via #47691

The call to `errors.Cause()` can return `nil` if the error was not
wrapped. It's wrapped always (by accident) in the 20.1 tree, but
that's not guaranteed/enforced.

Release note: None

Co-authored-by: Yahor Yuzefovich <[email protected]>
Co-authored-by: Oliver Tan <[email protected]>
Co-authored-by: Alfonso Subiotto Marques <[email protected]>
Co-authored-by: Raphael 'kena' Poss <[email protected]>
@otan otan removed their assignment Apr 20, 2020
@craig craig bot closed this as completed in c73fb58 Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-pgcompat Semantic compatibility with PostgreSQL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants