Re: [GENERAL] Row based permissions: at DB or at Application level?

2017-07-25 Thread Daniel Westermann
>How could an application which gets written from scratch use PostgreSQL to >implement >row based permissions? Are you looking for this? https://www.postgresql.org/docs/9.6/static/ddl-rowsecurity.html Regards Daniel

Re: [GENERAL] Which process is actually doing the WAL writes/calls XLogFlush?

2017-06-27 Thread Daniel Westermann
AFAIK the wal writer process. ​>Um, no. "Synchronous" means that the caller has to wait for the result to appear before it can move on. "Asynchronous" means that >he caller can issue the instruction and immediately move on. I guessing here but while usually the caller would have to provid

Re: [GENERAL] Which process is actually doing the WAL writes/calls XLogFlush?

2017-06-27 Thread Daniel Westermann
>On 06/23/2017 05:50 AM, Daniel Westermann wrote: >> Hi all, >> >> as I did not find the answer in the documentation: Which background >> process is actually doing the writes/flushes to the WAL? In the docs >> ( https://www.postgresql.org/docs/10/stat

[GENERAL] Which process is actually doing the WAL writes/calls XLogFlush?

2017-06-23 Thread Daniel Westermann
Hi all, as I did not find the answer in the documentation: Which background process is actually doing the writes/flushes to the WAL? In the docs (https://www.postgresql.org/docs/10/static/wal-configuration.html) it is explained which internal functions are responsible for this: XLogInsertRecor

[GENERAL] PostgreSQL upgrade best practices, please share your thoughts

2017-04-27 Thread Daniel Westermann
Hi all, currently I am preparing my session (PostgreSQL upgrade best practices) for the Swiss PGDay 2017 (http://www.pgday.ch/2017/). What I plan to come up with is: - Support policy - Release notes - Why it is important to upgrade (or at least to patch to the latest minor release) - Minor

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
Daniel Westermann writes: >> Thank you, Merlin. As said I know that "not in" is not a good choice in this >> case but I still do not get what is going here. Why does the >> repeatedly search for NULL values when I decrease work_mem and why not when >> increas

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
2017-04-05 10:33 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : 2017-04-05 10:13 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : BQ_BEGIN 2017-04-05 9:28 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : B

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
2017-04-05 10:13 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : 2017-04-05 9:28 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : BQ_BEGIN >>what is result of EXPLAIN statement for slow and fast cases? >> >>regar

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
2017-04-05 9:28 GMT+02:00 Daniel Westermann < daniel.westerm...@dbi-services.com > : >>what is result of EXPLAIN statement for slow and fast cases? >> >>regards >> >>Pavel For work_mem=32MB explain (analyze,verbose,buffers) select count(user_

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-05 Thread Daniel Westermann
>>what is result of EXPLAIN statement for slow and fast cases? >> >>regards >> >>Pavel For work_mem=32MB explain (analyze,verbose,buffers) select count(user_id) from users where user_id not in ( select id from ids); QUERY PLAN -

Re: [GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-04 Thread Daniel Westermann
>> I have set work_mem to a very low value intentionally for demonstration >> purposes: >> >> postgres=# show work_mem; >> work_mem >> -- >> 16MB >> (1 row) >> >> postgres=# show shared_buffers ; >> shared_buffers >> >> 128MB >> (1 row) >> >> >> When I run t

[GENERAL] Query never completes with low work_mem (at least not within one hour)

2017-04-04 Thread Daniel Westermann
Hi, PostgreSQL 9.6.2 on CentOS 7.3 x64. This is my data set: drop table if exists users; drop table if exists ids; create table users ( user_id int , username varchar(50) ); with generator as ( select a.* from generate_series (1,300) a order by random() ) insert into users ( use

[GENERAL] Is there a reason the "-v/verbose" switch is not printed with pg_dumpall --help

2016-12-23 Thread Daniel Westermann
postgres@pgbox:/u01/app/postgres/local/dmk/ [PG961] pg_dumpall -V pg_dumpall (PostgreSQL) 9.6.1 postgres@pgbox:/u01/app/postgres/local/dmk/ [PG961] pg_dumpall --help pg_dumpall extracts a PostgreSQL database cluster into an SQL script file. Usage: pg_dumpall [OPTION]... General options: -f

Re: [GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
>It isn't consistent but it's by purpose. And there's a really good reason for >that behaviour. There's no issue with psql connecting to a >default database >because psql doesn't do anything by itself. pg_restore will do something to >the database it connects to. It might drop >some objects, cre

Re: [GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
>> postgres@pgbox:/home/postgres/ [PG961] pg_restore -h localhost -p 5439 -F d >> -C -j 2 /var/tmp/exp/ >> >> This runs fine but where does it connect to? Nothing is listening on port >> 5439. >Given the lack of a -d switch, I'd expect it not to try to connect >anywhere, just emit the restor

Re: [GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
It does Sent from my Phone > On 21 Dec 2016, at 18:40, Andreas Kretschmer wrote: > > > >> Am 21.12.2016 um 18:22 schrieb Daniel Westermann: >> >> >> Now I try to import into 9.6.1 => the instance is not running but the >> environment is set:

[GENERAL] pg_restore to a port where nobody is listening?

2016-12-21 Thread Daniel Westermann
Hi all, I have a PostgreSQL 9.5.4 and a PostgreSQL 9.6.1 instance installed on the same host. I dump the 9.5.4 instance with: pg_dump -h localhost -p 5438 -C -c -F d -j 2 -f /var/tmp/exp/ test .. which runs fine. I get the output as expected: postgres@pgbox:/home/postgres/ [PG954] ls /var/t

[GENERAL] Documentation archive links broken for 6.3 up to 7.1

2016-11-07 Thread Daniel Westermann
Hi, just noticed that the links from 6.3 to 7.1 are broken here: https://www.postgresql.org/docs/manuals/archive/ Regards Daniel

Re: [GENERAL] Deleting a table file does not raise an error when the table is touched afterwards, why?

2016-05-30 Thread Daniel Westermann
>> Alex Ignatov started a new thread was started on this topic as well...​ >> >> https://www.postgresql.org/message-id/c571dfc5-91b0-0df2-4e3f-45bc94c11...@postgrespro.ru >> >> >>I posted a link to this thread on his new one as well. >> >>David J.​ for completeness: same issue with data c

Re: [GENERAL] Deleting a table file does not raise an error when the table is touched afterwards, why?

2016-05-30 Thread Daniel Westermann
>>> >>>On Mon, 30 May 2016 17:35:34 +0200 (CEST), Daniel Westermann >>>(daniel.westerm...@dbi-services.com) wrote about "[GENERAL] Deleting a >>>table file does not raise an error when the table is touched >>>afterwards, why?" (in

[GENERAL] Deleting a table file does not raise an error when the table is touched afterwards, why?

2016-05-30 Thread Daniel Westermann
Hi, I need to understand something: Lets assume I have a table t5 with 1'000'000 rows: (postgres@[local]:5432) [sample] > select count(*) from t5; count - 100 (1 row) Time: 2363.834 ms (postgres@[local]:5432) [sample] > I get the file for that table: postgres@pg_essentia

Re: [GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Daniel Westermann
>> >>Provide a link to the source document where you found the link you have >>posted its the homepage http://www.postgresql.org

[GENERAL] Release Notes Link is broken on the website

2016-05-12 Thread Daniel Westermann
just to let you know: This link is broken: http://www.postgresql.org/docs/9./static/release-9-6.html The description on the website is wrong: PostgreSQL 9.6 Beta 1, 9.5.2, 9.4.7, 9.3.12, 9.2.16 and 9.1.21 Released! Shoud be 9.5.3, shouldn't it? Cheers, Daniel

Re: [GENERAL] PG 9.5.2, freetds + tds_fdw => server crash

2016-04-27 Thread Daniel Westermann
>> postgres@pgreporting:/home/postgres/ [PGREP] cat /etc/centos-release >> CentOS Linux release 7.2.1511 (Core) >> >> Any ideas? >File an issue here: >https://github.com/tds-fdw/tds_fdw/issues Thanks, issue created

[GENERAL] PG 9.5.2, freetds + tds_fdw => server crash

2016-04-27 Thread Daniel Westermann
Hi, I have installed freetds and can connect to the remote mssql server: postgres@pgreporting:/home/postgres/ [PGREP] tsql -S mssql -U ds2user -P xxx -D ds2 -o v locale is "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=de_CH.UTF-8;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=de_CH.UTF-8;LC_M

Re: [GENERAL] Replacement for Oracle Text

2016-02-19 Thread Daniel Westermann
>> >> I don't know about PLPerl(I'm pretty sure it could be used for this purpose, >> though.). On the other hand I've written code for this in Python which >> should >> be easy to adapt for PLPython, if necessary. >Right, so you would write a PL/Perl or PL/Python trigger function that >woul

Re: [GENERAL] Replacement for Oracle Text

2016-02-19 Thread Daniel Westermann
>>Daniel Westermann schrieb am 19.02.2016 um 11:53: >>> if I'd need to implement/replace Oracle Text >>> (ww.oracle.com/technetwork/testcontent/index-098492.html). >>>> What choices do I have in PostgreSQL (9.5+) ? >Postgres also has a full text

[GENERAL] Replacement for Oracle Text

2016-02-19 Thread Daniel Westermann
Hi, if I'd need to implement/replace Oracle Text (ww.oracle.com/technetwork/testcontent/index-098492.html). What choices do I have in PostgreSQL (9.5+) ? Regards Daniel

[GENERAL] Question on memory management sysv/posix on Linux

2016-02-17 Thread Daniel Westermann
Hi I have a question about memory management in PostgreSQL. I understand the default on Linux usually is "posix" which creates files in /dev/shm. With the default settings of 128MB for shared_buffers this is the result: ls -la /dev/shm total 4 drwxrwxrwt 2 root root 60 Feb 17 11:19 . drwxr

Re: [GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo

2015-12-15 Thread Daniel Westermann
From: "John R Pierce" To: pgsql-general@postgresql.org Sent: Tuesday, December 15, 2015 10:55:01 AM Subject: Re: [GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo On 12/15/2015 1:16 AM, John R Pier

[GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo

2015-12-15 Thread Daniel Westermann
Hi, we try to dump a PostgreSQL 8.2.4 instance with pg_dump from version 9.4.5 (enterprisedb version) over the network. This is the error we get: pg_dump: [archiver (db)] query failed: ERROR: schema "sys" does not exist pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, db