[GENERAL]

2017-11-03 Thread K. Brannen
s 32 bits. :) Based on your example, you're storing epoch in milliseconds, which exceeds 2^32, so you have to use bigint. Check out the size of the int and bigint data types in the docs. HTH, Kevin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

[GENERAL] Hot Standby syntax error

2017-11-03 Thread nmmulla
ortgresql.conf file: archive_command = 'copy "%p" "D:\\apps\\postgres\\pg_archivelog\\%f"' I am archiving to local server -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Postgresql.conf not found

2017-11-03 Thread Andreas Kretschmer
test=*# Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Postgresql.conf not found

2017-11-03 Thread Stefan Fercot
Hi, You can find the file locations on https://wiki.debian.org/PostgreSql#File_locations You should find the configuration in /etc/postgresql/9.6/main. Kind regards, On 11/03/2017 12:51 PM, Neto pr wrote: > > Hello All > > I was trying to install postgresql by this tutorial > http://powa.readt

[GENERAL] Postgresql.conf not found

2017-11-03 Thread Neto pr
Hello All I was trying to install postgresql by this tutorial http://powa.readthedocs.io/en/latest/quickstart.html to use the tool for bd Powa. I am use S.O. debian 8 Jessie. I ran: apt-get install postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6 apt-get install postgresql-9.6-powa S

Re: [GENERAL] [HACKERS] SSL and Encryption

2017-11-03 Thread Daniele Varrazzo
preferred using a native driver that didn't use libpq I'm pretty sure they don't. The industry standard uses libpq. -- Daniele -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] EXPLAIN command just hangs...

2017-11-03 Thread Peter J. Holzer
On 2017-11-02 20:51:23 +, Rhhh Lin wrote: [...] > where timestamp BETWEEN 150667656 AND 150875022 [...] > *Also, as a sidenote - can someone please expand on why one (I was not > involved > in the creation of this DB/schema definition) would choose to have the > definition of the time

Re: [GENERAL] [HACKERS] SSL and Encryption

2017-11-02 Thread John R Pierce
s in santa cruz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [HACKERS] SSL and Encryption

2017-11-02 Thread Jeff Janes
On Thu, Nov 2, 2017 at 9:58 PM, John R Pierce wrote: > On 11/2/2017 9:39 PM, Michael Paquier wrote: > > The SCRAM discussion is spread across two threads mainly with hundreds > of emails, which may discourage even the bravest. Here are links to > the important > documentation:https://www.postgre

Re: [GENERAL] [HACKERS] SSL and Encryption

2017-11-02 Thread John R Pierce
On 11/2/2017 9:39 PM, Michael Paquier wrote: The SCRAM discussion is spread across two threads mainly with hundreds of emails, which may discourage even the bravest. Here are links to the important documentation: https://www.postgresql.org/docs/current/static/auth-methods.html#auth-password so

Re: [GENERAL] [HACKERS] SSL and Encryption

2017-11-02 Thread Michael Paquier
5802: https://tools.ietf.org/html/rfc5802 https://tools.ietf.org/html/rfc7677 -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [HACKERS] SSL and Encryption

2017-11-02 Thread Craig Ringer
r pgsql-hackers. For password crypto please go read the SCRAM thread and the PostgreSQL 10 release notes. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@postgresq

[GENERAL] SSL and Encryption

2017-11-02 Thread chiru r
Hi , Please suggest the best chiper suite to configure openSSL for PostgreSQL Server and client?. How to use other than md5 encryption algorithm to encrypt the passwords in PostgreSQL? Thanks, Chiru

Re: [GENERAL] checkpoint and recovering process use too much memory

2017-11-02 Thread Andres Freund
that both checkpointer and startup process touch most shared buffers and thus show up as having touched all that memory. Regards, Andres Freund -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] checkpoint and recovering process use too much memory

2017-11-02 Thread Justin Pryzby
ostgres 20 0 34.9g 25g 25g S 0.0 40.4 46:36.86 postgres: > startup process recovering 00040855004B > 167162 postgres 20 0 34.9g 25g 25g S 0.0 40.2 17:58.38 postgres: > checkpointer process > > shared_buffers = 32GB Also, what is work_mem ? Justin -

[GENERAL] checkpoint and recovering process use too much memory

2017-11-02 Thread tao tony
hi dears, I had an asynchronous steaming replication HA cluster.Each node had 64G memory.pg is 9.6.2 and deployed on centos 6. Last month the database was killed by OS kernel for OOM,the checkpoint process was killed. I noticed checkpoint process occupied memory for more than 20GB,and it wa

Re: [GENERAL] EXPLAIN command just hangs...

2017-11-02 Thread Justin Pryzby
and see if it's reading (or writing??) consecutively (hopefully with ample OS readahead) or randomly (without). Justin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] EXPLAIN command just hangs...

2017-11-02 Thread Tom Lane
regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] EXPLAIN command just hangs...

2017-11-02 Thread Rhhh Lin
: Justin Pryzby Sent: 02 November 2017 21:02 To: Rhhh Lin Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] EXPLAIN command just hangs... On Thu, Nov 02, 2017 at 08:51:23PM +, Rhhh Lin wrote: > However, this query will run for days without completing. I suspect it has to > do w

Re: [GENERAL] EXPLAIN command just hangs...

2017-11-02 Thread Justin Pryzby
_pid() before starting "explain") does it show "active" state or waiting ? If it's waiting, you can see what it's waiting ON by looking at pg_locks.. Maybe like: SELECT c.query, * FROM pg_locks a JOIN pg_locks b USING(relation) JOIN pg_stat_activity c ON b.pid=c.pid

[GENERAL] EXPLAIN command just hangs...

2017-11-02 Thread Rhhh Lin
Hi all, version = Postgres 9.3.10 I have a table with approx. 5 million rows. It is defined something like the below. col: type: timestamp bigint measurement_id integer value numeric(24,5) minval numeric(24,5) maxval numeric(24,5) There are two BTree indexes in place on the PK ("timestamp", "me

Re: [GENERAL] syntax error

2017-11-02 Thread nmmulla
I have figured it out. Thanks for thinking -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Building tds_fdw Extension for Windows 64bit

2017-11-02 Thread Tom Lane
;t help you more than that. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Logical decoding error

2017-11-02 Thread Mark Fletcher
On Thu, Nov 2, 2017 at 9:59 AM, Steve Atkins wrote: > > Where are the errors coming from - your code or pgx? If it's from pgx, > what's the exact error? ('w' is regular replication payload data, so it'd > be expected as a copydata payload message type, but would be an error for a > replication me

Re: [GENERAL] Building tds_fdw Extension for Windows 64bit

2017-11-02 Thread Igal @ Lucee.org
On 11/2/2017 8:40 AM, Tom Lane wrote: It looks to me like MSVC is complaining about the PGDLLEXPORT markings that tds_fdw.c has on the function definitions (not the extern declarations). In the core code we only put PGDLLEXPORT in extern declarations ... so try keeping it in the externs and remo

Re: [GENERAL] Logical decoding error

2017-11-02 Thread Steve Atkins
;s support for the pgoutput logical decoder in PG10, which might be a bit more robust to deal with than the test_decoding one). Cheers, Steve -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] syntax error

2017-11-02 Thread Noor Mulla
Hi, I am setting up PostgreSQL standby on windows for the first time on version 9.4.14: Is the below syntax correct in the recovery.conf file restore_command = 'copy "D:\\apps\postgres\\pg_archivelog\\%f" "%p"' archive_cleanup_command = 'pg_archivecleanup "D:\\apps\postgres\pg_archivelog\\"

[GENERAL] Logical decoding error

2017-11-02 Thread Mark Fletcher
Hello, Running Postgres 9.6.5, we're using logical decoding to take changes to the database and propagate them elsewhere in our system. We are using the PGX Go Postgres library, at https://github.com/jackc/pgx, and we are using the test_decoding plugin to format the changes. We are using 6 slots/h

Re: [GENERAL] Building tds_fdw Extension for Windows 64bit

2017-11-02 Thread Tom Lane
nd this see https://www.postgresql.org/message-id/flat/A737B7A37273E048B164557ADEF4A58B539300BD%40ntex2010a.host.magwien.gv.at regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Building tds_fdw Extension for Windows 64bit

2017-11-02 Thread Igal @ Lucee.org
e with oracle_fdw, I would change the function declaration in tds_fdw.h to extern PGDLLEXPORT Datum tds_fdw_handler(PG_FUNCTION_ARGS); Thanks, Laurenz, but I am still getting the same error after prefixing the PGDLLEXPORT statements with `extern` in the `.c` files.  The `.h` files already had `extern

Re: [GENERAL] Building tds_fdw Extension for Windows 64bit

2017-11-02 Thread Laurenz Albe
y to publish my binaries of the extension if I ever get > that far. > Can anyone help? Based on my experience with oracle_fdw, I would change the function declaration in tds_fdw.h to extern PGDLLEXPORT Datum tds_fdw_handler(PG_FUNCTION_ARGS); Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Building tds_fdw Extension for Windows 64bit

2017-11-01 Thread Igal @ Lucee.org
Hello, After reading Craig's excellent blog post at https://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows/ I decided to try and build a real extension - tds_fdw. I've set it up in Visual Studio Community 2017, but am getting the following errors: Error    C2375

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Tom Lane
ne deletion of the system catalog entries for the toast table as well. I'm not likely to work on this idea myself in the near future, but if anyone else is feeling motivated to attack the problem, have at it ... regards, tom lane -- Sent via pgsql-general mailing list

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Adam Brusselback
thin a transaction. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Tom Lane
o long and has only been reported a couple of times is the main reason why I'm loath to take a brute force duplicate-the-data approach to fixing it. Such a fix would penalize many more people than it would help. regards, tom lane -- Sent via pgsql-general mailing list

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Adam Brusselback
Huh, so in the other cases where the function works fine, it's likely that the data all just fits within the regular table and doesn't have to be TOAST'ed? So this is something that isn't changed in PG10, and I could have encountered in 9.6, and just by chance didn't? This is a pattern I've used

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Tom Lane
fix it at some point, but the sticking point is how to cover this corner case without causing a performance drop for normal cases. In the meantime, maybe you could make the temp tables be ON COMMIT DROP instead of dropping them explicitly mid-transaction. regards, tom lane

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Adam Brusselback
the end in there, it'll blow up every time. This seriously seems like a bug to me. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Adam Brusselback
I believe it's one of the temp tables. The oid changes each time the function is run. I'll put some logging in place to identify the exact temp table it is though.

Re: [GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Justin Pryzby
log), can you send the log fragment for the line with error_severity='ERROR' ? https://www.postgresql.org/docs/current/static/runtime-config-logging.html#runtime-config-logging-csvlog Justin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] Possible bug: could not open relation with OID [numbers] SQL State: XX000

2017-11-01 Thread Adam Brusselback
ROP TABLE IF EXISTS tmp_params; DROP TABLE IF EXISTS tmp_valid_companies; DROP TABLE IF EXISTS direct_ids; DROP TABLE IF EXISTS tmp_price; DROP TABLE IF EXISTS direct_info; DROP TABLE IF EXISTS tmp_rates; DROP TABLE IF EXISTS tmp_base; DROP TABLE

Re: [GENERAL] explain analyze output: 0 rows, 1M loopa

2017-11-01 Thread Scott Marlowe
ecord being found". > IIUC I'd be wondering why some form of hash join wasn't used... Thanks I think you've got it. I wish it would fit in a hash but the dataset this query works on is so big that it spills to disk with work_mem=16GB... :( -- Sent via pgsql-g

Re: [GENERAL] explain analyze output: 0 rows, 1M loops

2017-11-01 Thread David G. Johnston
On Wed, Nov 1, 2017 at 12:25 PM, Justin Pryzby wrote: > On Wed, Nov 01, 2017 at 12:19:21PM -0700, David G. Johnston wrote: > > On Wed, Nov 1, 2017 at 11:59 AM, Scott Marlowe > > wrote: > > > > > So some of my output from an explain analyze here has a line that says > > > this: > > > > > > ex Sca

Re: [GENERAL] explain analyze output: 0 rows, 1M loops

2017-11-01 Thread Justin Pryzby
sulted in a record being found". > IIUC I'd be wondering why some form of hash join wasn't used... Except that: https://www.postgresql.org/docs/current/static/using-explain.html "... the loops value reports the total number of executions of the node, and the actual time an

Re: [GENERAL] explain analyze output: 0 rows, 1M loopa

2017-11-01 Thread David G. Johnston
On Wed, Nov 1, 2017 at 11:59 AM, Scott Marlowe wrote: > So some of my output from an explain analyze here has a line that says > this: > > ex Scan using warranty_order_item_warranty_order_id_idx on > warranty_order_item woi_1 (cost=0.57..277.53 rows=6 width=137) (actual > time=0.110..0.111 rows=0

[GENERAL] explain analyze output: 0 rows, 1M loopa

2017-11-01 Thread Scott Marlowe
on PostgreSQL 9.5.6. -- To understand recursion, one must first understand recursion. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Monitoring of a hot standby with a largely idle master

2017-11-01 Thread Peter Eisentraut
suggest. > > > new version looks good. committed I changed to links to xrefs, which automatically generated the correct target texts. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via

Re: [GENERAL] the database system is shutting down - terminating walsender process due to replication timeout

2017-11-01 Thread Tom Lane
walsender timeout, so maybe what you hit is an as-yet-unresolved bug, but in any case you should be keeping up with minor releases. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] the database system is shutting down - terminating walsender process due to replication timeout

2017-11-01 Thread Zarko Aleksic
Greetings everyone, I'm looking for a bit of help understanding a particular behavior we are seeing with our PostgreSQL 9.6. After issuing a service shutdown command with "systemctl stop" on RHEL 7 our PostgreSQL instance started behaving weirdly. For the first time it wouldn't shutdown so eas

[GENERAL] the database system is shutting down - terminating walsender process due to replication timeout

2017-11-01 Thread Zarko Aleksic
Greetings everyone, I'm looking for a bit of help understanding a particular behavior we are seeing with our PostgreSQL 9.6. After issuing a service shutdown command with "systemctl stop" on RHEL 7 our PostgreSQL instance started behaving weirdly. For the first time it wouldn't shutdown so ea

Re: [GENERAL] Query plan for Merge Semi Join

2017-11-01 Thread Laurenz Albe
═══╝ > > That is almost certainly not ideal, but this is not my question. > > My question is what does that merge semi join actually do? A semi join returns on

[GENERAL] Query plan for Merge Semi Join

2017-11-01 Thread Peter J. Holzer
══╝ That is almost certainly not ideal, but this is not my question. My question is what does that merge semi join actually do? In general a merge join needs two inputs sorted by the merge key. It walks both in parallel and joins matching lines. Correct? The first input is

Re: [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions

2017-10-31 Thread Arjen Nienhuis
riginal Message- From: Michael Paquier [mailto:michael.paqu...@gmail.com] Sent: Tuesday, October 31, 2017 4:06 PM To: Stephen Froehlich Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions On Tue, Oct 31, 2017 at 8:36 PM, St

Re: [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions

2017-10-31 Thread Stephen Froehlich
pgsql-general@postgresql.org Subject: Re: [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions On Tue, Oct 31, 2017 at 8:36 PM, Stephen Froehlich wrote: > CREATE TABLE lotsa_data_20171027_src3 PARTITION OF lotsa_data > FOR VALUES FROM ('2017-10-26 18:00:00-06&#

Re: [GENERAL] pgaduit - is there a way to audit a role

2017-10-31 Thread David Steele
nect to the db as rakesh who is part of db_rw role. This will not work because settings (GUCs) on a role are not inherited by roles (or users) that are members of that role. This is a characteristic of the roles system and not inherent to pgAudit. -- -David da...@pgmasters.net -- Sent vi

Re: [GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions

2017-10-31 Thread Michael Paquier
>= 1, and the second partition allows source_no >= 3 which overlaps with the first one. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] PG 10 - Trouble with overlap of range partition of two dimensions

2017-10-31 Thread Stephen Froehlich
So I have a table that has two fields I want to partition by: CREATE TABLE lotsa_data ( start_time timestamp with time zone, source_nointeger, counter integer) PARTITION BY RANGE (start_time, source_no); CREATE TABLE lotsa_data_20171027_src1 PARTITION OF lotsa_data FOR VALUES FROM

Re: [GENERAL] query not scaling

2017-10-31 Thread Rob Sargent
we don't need many digits of precision. Thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Roles inherited from a role which is the owner of a database can drop it?

2017-10-31 Thread Stephen Frost
Greetings, * Ivan Voras (ivo...@gmail.com) wrote: > On 30 October 2017 at 22:10, David G. Johnston > wrote: > > ​Not quite following but ownership is an inheritable permission; > > Basically, I'm asking if "ownership" can be revoked from the set of > inherited permissions? If there is a role G w

Re: [GENERAL] pg_audit to mask literal sql

2017-10-31 Thread Stephen Frost
Greetings, * rakeshkumar464 (rakeshkumar...@outlook.com) wrote: > By mask I mean pgaudit should log where ssn = '123-456-7891' as where ssn = > '?' Data masking really isn't part of auditing, and so even if pgaudit could do so, that wouldn't really be the right place to make it happen. There ha

Re: [GENERAL] Backup strategy using 'wal_keep_segments'

2017-10-31 Thread Stephen Frost
Greetings, * Rhhh Lin (ruanline...@hotmail.com) wrote: > I would actually be an advocate for using a proper archive_command in order > to facilitate a proper (Per the documentation) PITR and backup strategy. Glad to hear it. > However, a colleague had suggested such a creative approach (Possibl

Re: [GENERAL] Backup strategy using 'wal_keep_segments'

2017-10-31 Thread Michael Paquier
e using something like pg_receivexlog, pg_stat_replication is the way to go to monitor the archiving progress. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Backup strategy using 'wal_keep_segments'

2017-10-31 Thread Rhhh Lin
ng called upon again for restartpoints/checkpoints. That is, where is my absolute point (or file) of archival using something along the lines of 'pg_current_xlog_location'. Regards, Ruan From: Stephen Frost Sent: 30 October 2017 16:41:11

Re: [GENERAL] How to access a second database

2017-10-31 Thread John R Pierce
abase (which are treated exactly the same as tables in the same schema, other than naming). -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to access a second database

2017-10-31 Thread John R Pierce
ed to use FDW and foreign tables. see https://www.postgresql.org/docs/current/static/postgres-fdw.html -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mai

Re: [GENERAL] How to access a second database

2017-10-31 Thread Stanislav Ganin
. Users and groups of users are shared across the entire cluster, but no other data is shared across databases. Any given client connection to the server can access only the data in a single database, the one specified in the connection request.” Regards, Stanislav From: pgsql-general-ow

[GENERAL] How to access a second database

2017-10-31 Thread Sherman Willden
I am trying to access a table from another database. I have the permissions to create under my own login. I have performed the following so far: sherman@sql-dev: createdb sandbox01 sherman@sql-dev:~$ createdb sandbox02. After logging into sandbox02 I performed the following: sandbox02=# CREATE TABL

Re: [GENERAL] Roles inherited from a role which is the owner of a database can drop it?

2017-10-30 Thread Ivan Voras
Hello, On 30 October 2017 at 22:10, David G. Johnston wrote: > On Mon, Oct 30, 2017 at 12:25 PM, Ivan Voras wrote: > >> >> 3. But they do log in with "developer" roles which are inherited from the >> owner role. >> >> ​[...]​ > >> I've tried it on a dummy database and it apparently works as des

[GENERAL] From the "SQL is verbose" department, WINDOW RANGE specifications

2017-10-30 Thread David G. Johnston
The default range specification is: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW It seems like a common second choice is to want: RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING Why did they have to make something so common take 49 characters that, for seldom-using users, is near

Re: [GENERAL] Make "(composite).function_name" syntax work without search_path changes?

2017-10-30 Thread Tom Lane
de from the difficulty of documenting it clearly, that seems like a great recipe for security hazards. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] query not scaling

2017-10-30 Thread Laurenz Albe
591) > Index Cond: ((m.chrom = 22) AND (m.basepos >= s.startbase) AND (m.basepos <= s.endbase)) I think your biggest problem is the join condition on m.basepos between s.startbase and s.endbase That forces a nested loop join, which cannot be performed efficiently. Yours, La

[GENERAL] pgaduit - is there a way to audit a role

2017-10-30 Thread rakeshkumar464
from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Make "(composite).function_name" syntax work without search_path changes?

2017-10-30 Thread David G. Johnston
CREATE SCHEMA altschema; CREATE TYPE altschema.alttype AS ( altid text, altlabel text ); CREATE FUNCTION altschema.label(item altschema.alttype) RETURNS text LANGUAGE sql AS $$ SELECT (item).altlabel; $$; WITH vals (v) AS ( SELECT ('1', 'One')::altschema.alttype ) SELECT (v).label FROM vals; --

Re: [GENERAL] pg_audit to mask literal sql

2017-10-30 Thread rakeshkumar464
By mask I mean pgaudit should log where ssn = '123-456-7891' as where ssn = '?' -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] pg_audit to mask literal sql

2017-10-30 Thread rakeshkumar464
Yes all who interact with HIPAA data are trained for HIPAA SOP. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] pg_audit to mask literal sql

2017-10-30 Thread rakeshkumar464
No they do select. It is fine in HIPAA to view data which are protected, if it is part of your job. What is not fine is being careless with that protected data and let unauthorized person view that data. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: [GENERAL] pg_audit to mask literal sql

2017-10-30 Thread Rob Sargent
been HIPAA certified? Probable better to get them redacted data for testing. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pg_audit to mask literal sql

2017-10-30 Thread John R Pierce
thin their domain.   QA should be working on development or staging databases. -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Roles inherited from a role which is the owner of a database can drop it?

2017-10-30 Thread David G. Johnston
On Mon, Oct 30, 2017 at 12:25 PM, Ivan Voras wrote: > > 3. But they do log in with "developer" roles which are inherited from the > owner role. > > ​[...]​ > I've tried it on a dummy database and it apparently works as described > here. Is this by design? > > ​Not quite following but ownership i

Re: [GENERAL] pg_audit to mask literal sql

2017-10-30 Thread Arthur Zakirov
les may be useful too. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Roles inherited from a role which is the owner of a database can drop it?

2017-10-30 Thread Ivan Voras
Hello, I just want to verify that what I'm observing is true, and if it is, I'd like to know how to avoid it: 1. There are databases owned by a certain role which is a superuser 2. Nobody logs in with the superuser role unless necessary 3. But they do log in with "developer" roles which are inher

[GENERAL] pg_audit to mask literal sql

2017-10-30 Thread rakeshkumar464
an issue since pgaudit provides a way to suppress values. -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] the database system is shutting down - terminating walsender process due to replication timeout

2017-10-30 Thread Zarko Aleksic
Greetings everyone, I'm looking for a bit of help understanding a particular behavior we are seeing with our PostgreSQL 9.6. After issuing a service shutdown command with "systemctl stop" on RHEL 7 our PostgreSQL instance started behaving weirdly. For the first time it wouldn't shutdown so eas

Re: [GENERAL] gin index trouble

2017-10-30 Thread Rob Sargent
elect * from order by expose the corruption or does the load itself necessarily fail at the moment of corruption? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] gin index trouble

2017-10-30 Thread Peter Geoghegan
rruption, though.) Of course, what I'd much prefer is a self-contained test case. But if you can't manage that, or if reproducing the issue takes hours, then this simpler experiment might be worthwhile. -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] gin index trouble

2017-10-30 Thread Rob Sargent
nly being read. (In case you've been following, the failed execution would have added ~1M "segments", each which references an entry in the gin'd table "probandsets" - but like a rookie I'm looking up each probandset(2^16) individually. Re-working that NOW.)

Re: [GENERAL] UPDATE syntax change

2017-10-30 Thread Tom Lane
ssue. I'll go fix that ... regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] UPDATE syntax change (column-list UPDATE syntax fails with single column)

2017-10-30 Thread Adam Brusselback
Appreciate the link, didn't come up when I was googling the issue. As you said, a mention in the release notes would have been helpful. Thanks, -Adam -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mai

Re: [GENERAL] Backup strategy using 'wal_keep_segments'

2017-10-30 Thread Stephen Frost
Greetings, * Rhhh Lin (ruanline...@hotmail.com) wrote: > A colleague recently suggested that instead of implementing an > 'archive_command' to push archivable WALs to a secondary location (for > further backup to tape for example), we could instead persist the WAL files > in their current locat

Re: [GENERAL] UPDATE syntax change (column-list UPDATE syntax fails with single column)

2017-10-30 Thread Justin Pryzby
719174507.ga19...@telsasoft.com Justin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] gin index trouble

2017-10-30 Thread Peter Geoghegan
equently? -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] UPDATE syntax change

2017-10-30 Thread Adam Brusselback
a warning in 9.6, so there was nothing to tell me that the syntax was incorrect and would change later. Thanks, -Adam -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] gin index trouble

2017-10-30 Thread Tom Lane
; if it did regenerate the problem. It's possible you could duplicate the failure with synthetic data generated by a not-very-long script. That would beat uploading a large data file, not to mention possibly needing to sanitize your data. regards, tom lane -- Sent

Re: [GENERAL] gin index trouble

2017-10-30 Thread Peter Geoghegan
cient, and that we now continue to see the same mix of symptoms for what is essentially the same bug. [1] https://postgr.es/m/CAH2-WzmtLXbs8+c19t1T=rj0kyp7vk9q8hqjulgdldvmuee...@mail.gmail.com -- Peter Geoghegan -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] gin index trouble

2017-10-30 Thread Rob Sargent
ve worked. Good to hear. Thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] gin index trouble

2017-10-30 Thread Tom Lane
mediately see anything broken about this definition, so it seems like it should've worked. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] starting PG command line options vs postgresql.con

2017-10-30 Thread Michael Paquier
ust copy it temporarily. The current way of doing things gives the best of both worlds. -- Michael -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Comparing epoch to timestamp

2017-10-30 Thread Alexander Farber
# EXPLAIN SELECT ARRAY_AGG(hashed) FROM words_nouns WHERE added > to_timestamp(0) UNION SELECT ARRAY_AGG(hashed) FROM words_verbs WHERE added > to_timestamp(0)

Re: [GENERAL] starting PG command line options vs postgresql.con

2017-10-30 Thread David G. Johnston
On Mon, Oct 30, 2017 at 6:48 AM, rakeshkumar464 wrote: > I would prefer using postgresql.conf. what is the consensus in this forum > regarding command line vs postgresql.conf. ​I suspect that most people administering a PostgreSQL database would expect that the configuration file would be chan

Re: [GENERAL] starting PG command line options vs postgresql.con

2017-10-30 Thread Tom Lane
only matters if you're running multiple postmasters). Otherwise it's better to leave as much as you can to postgresql.conf. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

<    1   2   3   4   5   6   7   8   9   10   >