Some questions about schema privileges

2021-10-20 Thread Anna Akenteva
Hi all, I have been wondering about some things related to schema privileges: 1) Why do visibility rules apply to the \d command, but not to system tables? What is the purpose of hiding stuff from \d output while users can get the same info another way? 2) What is the reasoning behind separating

Re: Write visibility map during CLUSTER/VACUUM FULL

2021-06-28 Thread Anna Akenteva
g yet another copy of logic determining visibility: the visibility check was mainly taken from heap_page_is_all_visible(), so I refactored the code to make sure that logic is not duplicated. The updated patch is attached too. -- Anna Akenteva Postgres Professional: http://www.postgrespro.co

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-08-18 Thread Anna Akenteva
/flat/20200615182235.x7lch5n6kcjq4aue%40alap3.anarazel.de Thank you for the heads up! I updated the most recent patch and removed the use of "master" from it, replacing it with "primary". -- Anna Akenteva Postgres Professional: http://www.postgrespro.com The Russian Po

Re: psql: add \si, \sm, \st and \sr functions to show CREATE commands for indexes, matviews, triggers and tables

2020-08-11 Thread Anna Akenteva
uld there be \e functions too for any objects affected by this patch? -- Anna Akenteva Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: Change a constraint's index - ALTER TABLE ... ALTER CONSTRAINT ... USING INDEX ...

2020-08-09 Thread Anna Akenteva
On 2020-07-07 01:08, Tom Lane wrote: Alvaro Herrera writes: On 2020-Jul-05, Anna Akenteva wrote: -- Swapping primary key's index for an equivalent index, -- but with INCLUDE-d attributes. CREATE UNIQUE INDEX new_idx ON target_tbl (id) INCLUDE (info); ALTER TABLE target_tbl ALTER CONST

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-14 Thread Anna Akenteva
side a RR transaction block? Would it give a warning? -- Anna Akenteva Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-08 Thread Anna Akenteva
We could completely give up the LSN keyword for now. The final command could look something like: BEGIN AFTER ‘0/303EC60’ WITHIN '5 seconds'; or BEGIN AFTER ‘0/303EC60’ WITHIN 5000; I'd like to hear others' opinions on the syntax as well. -- Anna Akenteva Postgres Profess

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Anna Akenteva
WAIT FOR LSN on master - Added more tests - Checked the code with pgindent and adjusted pgindent/typedefs.list - Changed min_lsn's type to pg_atomic_uint64 + fixed how we work with mutex - Code cleanup in wait.[c|h]: cleaned up #include-s, gave better names to functions, changed elog() to e

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Anna Akenteva
g for something else, like XID-s, we can expand the grammar as needed. What are your own thoughts on the syntax? -- Anna Akenteva Postgres Professional: The Russian Postgres Company http://www.postgrespro.com

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-06 Thread Anna Akenteva
specifying timeout = 0 (BEGIN WAIT FOR LSN ... TIMEOUT 0) is the same as not specifying timeout at all? -- Anna Akenteva Postgres Professional: The Russian Postgres Company http://www.postgrespro.comdiff --git a/doc/src/sgml/ref/begin.sgml b/doc/src/sgml/ref/begin.sgml index c23bbfb4e71..19a33d7

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-03 Thread Anna Akenteva
I did some code cleanup and added tests - both for the standalone WAIT FOR statement and for WAIT FOR as a part of BEGIN. The new patch is attached. On 2020-04-03 17:29, Alexey Kondratov wrote: On 2020-04-01 02:26, Anna Akenteva wrote: - WAIT FOR [ANY | ALL] event [, ...] - BEGIN [ WORK

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-03-31 Thread Anna Akenteva
g to _copyTransactionStmt() / _equalTransactionStmt()? -- Anna Akenteva Postgres Professional: The Russian Postgres Company http://www.postgrespro.comdiff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index 8d91f3529e6..8697f9807ff 100644 --- a/doc/src/sgml/ref/allfiles.sg

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-03-25 Thread Anna Akenteva
, (WaitStmt *) stmt->wait); case TRANS_STMT_START: {... + WaitStmt *waitstmt = (WaitStmt *) stmt->wait; + res = WaitMain(waitstmt, dest); === After we added the "wait" attribute to TransactionStmt struct, do we perhaps need to add something to _copyTransactionStmt() / _eq

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-03-21 Thread Anna Akenteva
ou compare two LSN-s using pg_lsn_cmp(): res = DatumGetUInt32( DirectFunctionCall2(pg_lsn_cmp, lsn, trg_lsn)); As far as I understand, it'd be enough to use operators such as "<=", as you do in wait.c: /* If LSN has been replayed */ if (trg_lsn <= cur_lsn) -- Anna Akenteva Postgres Professional: The Russian Postgres Company http://www.postgrespro.com

Re: [HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Anna Akenteva
't really seem to be a good solution and I see now how it's hard to implement properly. I don't see other ways to make it work so far though. If it can't be fixed anytime soon, do you think that documenting this behavior could be worth it? -- Anna Akenteva Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

[HACKERS] [bug-fix] Cannot select big bytea values (~600MB)

2018-02-16 Thread Anna Akenteva
ct * from big_data; ERROR: invalid memory alloc request size 1468006403 -- Anna Akenteva Postgres Professional: http://www.postgrespro.com The Russian Postgres Companydiff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c index 9d4efc0..85296e9 100644 --- a/sr

Re: [HACKERS] REL9_6_STABLE - a minor bug in src/common/exec.c

2018-01-18 Thread Anna Akenteva
rc/common/exec.c:602 putenv(dup_path); Would it be possible to fix it the same way in REL9_6_STABLE and maybe other older versions too? -- Anna Akenteva Postgres Professional: http://www.postgrespro.com The Russian Postgres Company