Re: Choosing an index on partitioned tables.

2021-09-07 Thread Laurenz Albe
k better? > > I've had good success with TimescaleDB for large timesries databases (40b > readings). That has nothing to do with indexing, and I would think twice to install an invasive extension like that and add a dependency on third-party code, just because I want to partition a table. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Choosing an index on partitioned tables.

2021-09-07 Thread Laurenz Albe
the metrics column. With the B-tree deduplication feature added in v13, the index will be small, and I doubt that hash indexes would perform much better. If there is a dominant value, you could consider a partial index that excludes that value. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Behavior change in PostgreSQL 14Beta3 or bug?

2021-09-07 Thread Laurenz Albe
On Mon, 2021-09-06 at 12:11 -0700, Peter Geoghegan wrote: > On Mon, Sep 6, 2021 at 9:21 AM Laurenz Albe wrote: > > #define BYPASS_THRESHOLD_PAGES  0.02    /* i.e. 2% of rel_pages */ > > > > So up to an additional 2% of all pages can have the all-visible bit > > unset

Re: Behavior change in PostgreSQL 14Beta3 or bug?

2021-09-06 Thread Laurenz Albe
On Mon, 2021-09-06 at 11:59 -0400, Tom Lane wrote: > Laurenz Albe writes: > > It is not an incompatibility that warrants a mention in the release notes, > > but perhaps somthing in > > https://www.postgresql.org/docs/14/indexes-index-only-scans.html > > and/or > >

Re: Behavior change in PostgreSQL 14Beta3 or bug?

2021-09-06 Thread Laurenz Albe
quot;index_cleanup = on" for best performance with index-only scans. Suggested patch attached, should be backpatched to v14. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com From d98f4c4cb62b564e8f9a26ed4e8da80dadfbc55c Mon Sep 17 00:00:00 2001 From: Laurenz Alb

Re: How to observe plan_cache_mode transition from custom to generic plan?

2021-09-06 Thread Laurenz Albe
On Mon, 2021-09-06 at 03:07 -0400, Mladen Gogala wrote: > > On 9/6/21 2:26 AM, Laurenz Albe wrote: > > "Bind variables" just being an Oraclism for parameters, it is*not*  a > > mistake to use them in PostgreSQL. > > Actually, it is a mistake because they don

Re: How to observe plan_cache_mode transition from custom to generic plan?

2021-09-05 Thread Laurenz Albe
prepared statement. > People switching from Oracle, me being one of those, frequently make > mistake of using bind variables in Postgres. "Bind variables" just being an Oraclism for parameters, it is *not* a mistake to use them in PostgreSQL. Yours, Laurenz Albe

Re: No xmin in pg_database

2021-09-02 Thread Laurenz Albe
tly you are doing, so I cannot be certain. age(xmin) will not necessarily tell you how many transactions ago the row was created... Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: No xmin in pg_database

2021-09-02 Thread Laurenz Albe
numbers are recycled when transaction IDs wrap around, and you could have two entries with the same "xmin" that have a totally different meaning, because one of the rows is frozen and the other isn't. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: prevent WAL replication to fill filesystem

2021-08-31 Thread Laurenz Albe
by xlog > files in case of failure? Sure. Upgrade to v13 and set "max_slot_wal_keep_size". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Laurenz Albe
> 106 times : SELECT pg_catalog.format_type('42604'::pg_catalog.oid, NULL) > > In total, there were 5000 queries: > SELECT pg_catalog.format_type('[0-9]+'::pg_catalog.oid, NULL) > > But there were only 83 separate oids that were scanned. That is a strong argument for using a hash table to cache the types. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Can not ALTER TEXT SEARCH DICTIONARY intdict which is default in dict_int

2021-08-24 Thread Laurenz Albe
change or fail. Create your own dictionary with the same template. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Connecton timeout issues and JDBC

2021-08-23 Thread Laurenz Albe
dle" on the database server, then the setting is independent of the client used. I would say that a setting of 5 seconds is way too low. Set it to 600 or so, that would be 10 minutes. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: PostgreSQL 9.2 high replication lag

2021-08-19 Thread Laurenz Albe
standby servers for these two purposes. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: PostgreSQL Automatic Failover Windows Server

2021-08-19 Thread Laurenz Albe
c-postgresql/patroni-windows-packaging Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Laurenz Albe
ass, it waited for ShareLock on that transaction: There must have been something else using "pg_class", since the above won't take any permament locks on "pg_class", nor should it block VACUUM. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: dealing with dependencies

2021-07-16 Thread Laurenz Albe
some type of > "make" (that UNIX tool dealing with dependencies in the context of e.g. > programming in C) would be helpful... You have your view definitions stored in a source control system, and/or you employ a version management tool like Liquibase. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Problem upgrading from Postgresql 9.5

2021-07-15 Thread Laurenz Albe
read from input file: end of file > Error during cluster dumping, removing new cluster Unlucky you. The database you are tasked with upgrading is suffering from data corruption. You would get the same result if you SELECT * FROM public.mdl_local_intelliboard_details; You first have to deal with the data corruption, then you can upgrade. You might have to hire an expert. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Need to check each element of an array satisfies a foreign key constraint

2021-07-13 Thread Laurenz Albe
normal form, and the exercise will be simple. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: PostgreSQL 9.2 high replication lag

2021-07-13 Thread Laurenz Albe
elay to: > > https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-CONFLICT > > for the details. Perhaps you might find the following article interesting, where I tried to discuss this topic in some depth: https://www.cybertec-postgresql.com/en/streaming-replicati

Re: What to look for when excessively long commits

2021-07-11 Thread Laurenz Albe
quot;bcaas",8516,"10.122.37.247:41372",60e4d5fe.2144,94,"COMMIT",2021-07-06 > 22:15:26 UTC,16/0,0,LOG,0,"duration: 7877.650 ms","" > > The instance is in AWS RDS. It is a multi-az db.t3.xlarge machine class > running 10.6. It also has a read replica if that could be relevant. > > Thanks for any suggestions. Possible causes in decreasing order of likelihood: - I/O overload (look at I/O wait % in the CPU time). - large WITH HOLD cursors Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Why can't I drop a tablespace?

2021-07-11 Thread Laurenz Albe
d \di+ to determine if the table or any of its indexes actually resides in the new tablespace. Don't forget the TOAST table. If they are all still in the original tablespace as they should be on account of the transactional guarantees, go ahead and manually remove the files. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Damaged (during upgrade?) table, how to repair?

2021-07-01 Thread Laurenz Albe
; > How can I (?) repair this table? (for recent data this works OK). If you have a backup, take that. If not, hire an expert in data recovery. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: ALTER TABLE ... DETACH PARTITION just sitting there

2021-06-28 Thread Laurenz Albe
eferencing column? I've not looked at how this particular case > > is implemented, but typically, lack of such an index is fine > > until you try to delete PK-side rows. > > There are seven FK constraints, all in the format of (field_1, field_2). > Two referenced table have a supporting index on both columns, and five have > a supporting index on only field_1. Those five foreign keys that are not fully indexed may well be your problem. Yours, Laurenz Albe

Re: Difference between text_pattern_ops and varchar_pattern_ops

2021-06-25 Thread Laurenz Albe
y text_pattern_ops can be used on varchar columns, > considering it > can’t be used for bpchar columns? And are there any downsides in doing this > (aside from my confusion of course)? https://www.postgresql.org/message-id/flat/A737B7A37273E048B164557ADEF4A58B17CCE003%40ntex2010i.

Re: How much data does server side "loread" return?

2021-06-24 Thread Laurenz Albe
bytes actually read is returned; this will be less than 'len' if the end of the large object is reached first. In the event of an error, the return value is -1." So it will always read as many bytes as possible. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: insert ..... returning problem

2021-06-24 Thread Laurenz Albe
t; Why 'into var' is not accepted here? > > > > Are you talking about ECPG? > > I am using postgres c library, namely I'm calling PQexec() Then you don't need it. You may be mixing up SQL syntax and PL/pgSQL syntax. Just run the statement without t

Re: insert ..... returning problem

2021-06-24 Thread Laurenz Albe
d_type) > values ($1, $2) returning load_idx into $3 > > ^ > Why 'into var' is not accepted here? Are you talking about ECPG? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: user privileges

2021-06-21 Thread Laurenz Albe
ss1'; > > as the user is created with login privileges then what is the use such user ? The role can be the owner of objects, or it can have members that inherit privileges. But setting a password is pointless on a role that cannot login. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: A simple question about text fields

2021-06-17 Thread Laurenz Albe
with a check constraint on the length, that is, no added functionality. And it is worse for these reasons: - the performance will be worse (big reason) - the length limit is less obvious if you look at the table definition (small reason) Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: order by

2021-06-10 Thread Laurenz Albe
, equality is equality of all members, and don't ask me about IS NULL and IS NOT NULL, else I point you to https://www.postgresql.org/message-id/flat/48BDABE9-88AB-46E9-BABE-F70DDBFB98BD%40kineticode.com Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: base directory size getting increased

2021-06-07 Thread Laurenz Albe
On Mon, 2021-06-07 at 21:58 +0530, Atul Kumar wrote: > On Monday, June 7, 2021, Laurenz Albe wrote: > > On Mon, 2021-06-07 at 17:48 +0530, Atul Kumar wrote: > > > But once I rolled back the query, pgsql_tmp directory it was back to > > > 87 GBs so please help me in

Re: base directory size getting increased

2021-06-07 Thread Laurenz Albe
part of the temporary file name. It could be that such files are left behind after a crash. If you are sure that the don't belong to a running query (for example, if their modification timestamp is old), you can delete them. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: base directory size getting increased

2021-06-07 Thread Laurenz Albe
g 'why base sub directory size is getting > increased'? > > my postgres version is 9.6. Based on the little information you gave us, it could be one of - temporary files that get created by the query - you export the data into the data directory Yours, Laurenz Albe -

Re: AW: [Extern] Re: autovacuum on pg_catalog tables

2021-06-04 Thread Laurenz Albe
t problem is that any such catalog modifications would be lost after an upgrade. I would change the parameters in "postgresql.conf" and then override the settings for user table to be less aggressive where necessary. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: EXPLAIN (ANALYZE, BUFFERS) - puzzling numbers for a simple query.

2021-06-04 Thread Laurenz Albe
QUERY PLAN ═ Function Scan on generate_series (cost=0.00..0.25 rows=25 width=4) (1 row) Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Internationalisation (i18n) with Postgres as backend

2021-06-02 Thread Laurenz Albe
27;::text[]) > order by objectid,array_position('{de,en}'::text[],objectLang); That looks ok, except you should remove "objectid" from the index. That column makes that the index cannot be used for "objectlang" effectively. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Internationalisation (i18n) with Postgres as backend

2021-06-02 Thread Laurenz Albe
h > individual rows (e.g. using tsrange & gist exclude). But willing to be > proven wrong. Your intuition is good. Don't use JSON for that, and don't use the outdated hstore extension in particular. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: An exception about comparison operators

2021-05-26 Thread Laurenz Albe
characters, so "<>-" is treated as two tokens. But "!" does not appear in SQL standard operators, so there is no special processing. This is a hack to allow constructs like 1<>-2, which are required to comply with the SQL standard. If you want this behavior, sitch to standard SQL operator names and don't use !=. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: logical replication initial copy and WAL generation

2021-05-19 Thread Laurenz Albe
on WALWriteLock causing high > response time. > > Any idea how the initial copy can cause WAL generation ?! I don't know how much RDS is like PostgreSQL, but on PostgreSQL this could be the setting of hint bits for new rows that have never been read before. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Query on postgres_fdw extension

2021-05-14 Thread Laurenz Albe
possibility might be to define a trigger on the remote table that fetches the next sequence value if you try to insert NULL. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Issue in PG start

2021-05-09 Thread Laurenz Albe
. Either you didn't shut down PostgreSQL cleanly, or some server process crashed. The log should tell you which of the two happened. Did you set "checkpoint_timeout" to a high value? That will make the startup process potentially take longer to recover. Yours, Laurenz A

Re: Postgres upgrade 12 - issues with OIDs

2021-05-07 Thread Laurenz Albe
face the same problem later. However, for upgrading from v11 with little down time you may be able to use logical replication. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: "invalid contrecord" error on replica

2021-05-03 Thread Laurenz Albe
0FFFBE8 You are trying to stream from a server whose WAL position is *behind* your own. That cannot work. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Access a newer Version of PGDB (v13) with an older libpq (v10 x86)

2021-05-03 Thread Laurenz Albe
tput format, set "bytea_output" to "escape". If you output "bytea"s in binary form, nothing has changed. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Access a newer Version of PGDB (v13) with an older libpq (v10 x86)

2021-04-30 Thread Laurenz Albe
v10, and it worked very nice. > So my question is, could (or should) we rather use PostgresDB v13 (to > get the newest) or should we stay on PostgresDB v10 (to be more > compatible to our libpq/libpqxx). Use the latest PostgreSQL client if you can, it shouldn't be a problem. You

Re: postgres index usage count too high

2021-04-28 Thread Laurenz Albe
igh. The table contains cumulative statistics. So you should remember the value, look again in a day or a week and calculate the difference to see how often index scans have been used in that time. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: pgbouncer configuration

2021-04-27 Thread Laurenz Albe
@lsst-pgsql02 pgbouncer]$ egrep "auth_type" pgbouncer.ini > auth_type = pam > > any ideas? I'd suspect that pgBouncer is not built with PAM support after all. Run "ldd" on the executable and see if it links with OpenLDAP. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Temporary files usage in explain

2021-04-27 Thread Laurenz Albe
see at first glance: Sort Method: external merge Disk: 299,368kB To see all, use EXPLAIN (ANALYZE, BUFFERS). Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: DB size

2021-04-26 Thread Laurenz Albe
the database. Not all tables have their "relfilenode" set: SELECT relfilenode FROM pg_class WHERE relname = 'pg_class'; relfilenode ═════ 0 (1 row) Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: -1/0 virtualtransaction

2021-04-26 Thread Laurenz Albe
age and tuple locks accumulate over time. > Eventually this results in an "out of shared memory" error. Not sure, but do you see prepared transactions in "pg_prepared_xacts"? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Invalid byte sequence when importing Oracle BLOB

2021-04-26 Thread Laurenz Albe
s surprisingly easy to enter currupt strings into Oracle - just set client encoding to the same value as server encoding, and it won't check the integrity of your strings. If that is your problem, you must identify and fix the data in Oracle. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: client waits for end of update operation and server proc is idle

2021-04-23 Thread Laurenz Albe
saktion > 2021-04-23 05:59:17.419 CEST [26827] LOG: unerwartetes EOF auf > Client-Verbindung mit einer offenen Transaktion > > What else could be checked for this? Any hints about this issue? It seems pretty clear that both the client and the server are waiting for each other. The serv

Re: Vulnerability PostgreSQL 11.2

2021-04-18 Thread Laurenz Albe
That sounds right. A minor upgrade consists of installing the new files and replacing the old ones, then restarting the server. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Vulnerability PostgreSQL 11.2

2021-04-16 Thread Laurenz Albe
inor upgrade is done by installing the binaries and overwriting the old ones. It sounds like you are doing the right thing. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Size of PostgreSQL backup ./. Sybase DUMP

2021-04-16 Thread Laurenz Albe
ut if that dump is something akin to "pg_dump", then you are comparing apples and oranges. Moreover, the base backup is compressed, and I don't know if the Sybase dump is. If you had used PostgreSQL v13, you could check the backup for completenes. But the best test for a backup is to restore it. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Metric to calculate WAL size left to transfer to Standby

2021-04-15 Thread Laurenz Albe
network cannot cope. If only the second number is delayed, you have replication conflicts with queries on the standby. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Vulnerability PostgreSQL 11.2

2021-04-15 Thread Laurenz Albe
canner is telling you to install the latest fix for v11, and it is right to complain. Read https://www.postgresql.org/support/versioning/ Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup

2021-04-13 Thread Laurenz Albe
PostgreSQL cluster. If there is no "backup_label", PostgreSQL will get the latest checkpoint from the control file (global/pg_control), which may well be later than the checkpoint that started the backup, so you will miss to recover some transactions. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup

2021-04-13 Thread Laurenz Albe
;s problem. I am really > confused. Your mail got me confused... Why do you write the WAL to /tmp/pg_wal, only to later mount that at the default location? I see nothing wrong with what you are doing, but I may have got lost in your complicated procedure. You don't happen to remove "backup_label", do you? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Cascade publication with pg_stat_replication empty

2021-04-07 Thread Laurenz Albe
. While this second server was copying data with COPY to third, > everything was fine but when COPY finished and it would start streaming > data, both replication just stopped. Look into the PostgreSQL log on both machines. Yours, Laurenz Albe

Re: Open source licenses

2021-04-07 Thread Laurenz Albe
some, but you could go through all the shared libraries (DLLs) in the "bin" directory that do not belong to PostgreSQL. The licenses for software like OpenSSL should be easy to find. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Open source licenses

2021-04-06 Thread Laurenz Albe
Group consider to provide these > information ? > Is there a team or a group in charge of this ? Is there a direct email > address to ask this > kind of request ? These installation packages are provided by EnterpriseDB, not by the PGDG. I think your request is reason

Re: questions about wraparound

2021-04-06 Thread Laurenz Albe
g this would prevent the use of pg_upgrade for upgrading, as the on-disk format changes. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Primary keys and composite unique keys(basic question)

2021-04-02 Thread Laurenz Albe
the rightmost leaf page, but UUIDs are random. - UUIDs are more expensive to generate. On the other hand, many processes trying to insert into the same index page might lead to contention. Is there anything I have missed? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: questions about wraparound

2021-03-29 Thread Laurenz Albe
but autovacuum should handle those databases and advance their "datfrozenxid". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: questions about wraparound

2021-03-29 Thread Laurenz Albe
do anything except advance "datfrozenxid". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Enterprise Active Directory Authentication?

2021-03-24 Thread Laurenz Albe
eed to create the users in PostgreSQL. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: ERROR: could not attach to dynamic shared area

2021-03-24 Thread Laurenz Albe
izes that everybody else has already left and destroyed the memory segment. In the latter case, you can ignore the error. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: More than one UNIQUE key when matching items..

2021-03-20 Thread Laurenz Albe
NIQUE indexes. You can try this: INSERT ... ON CONFLICT DO NOTHING; Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: postgresql order lowercase before uppercase

2021-03-19 Thread Laurenz Albe
ecause FALSE < TRUE. > > This does not work for me. The same result as normal order. > > Amm > andere Marken > Ani > Anti > Bra > Cali You are allowed to adapt the query to your special needs. But if you need to be spoonfed: SELECT a.name FROM foo as a ORDER BY a.name = initcap(a.name), a.name; Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: postgresql order lowercase before uppercase

2021-03-19 Thread Laurenz Albe
On Thu, 2021-03-18 at 23:51 +0100, basti wrote: > Am 18.03.21 um 17:19 schrieb Laurenz Albe: > > On Thu, 2021-03-18 at 15:39 +0100, basti wrote: > > > I need to as follow: > > > > > > ande > > > Amma > > > Anit > > > Anti &g

Re: postgresql order lowercase before uppercase

2021-03-18 Thread Laurenz Albe
ali > > ande Create an ICU collation: CREATE COLLATION inv (PROVIDER = icu, LOCALE = "en-US@CaseFirst=LowerFirst"); Then use ORDER BY name COLLATE inv Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Laurenz Albe
Disposition: Open, Options: Synchronous IO Non-Alert, Open > Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, > AllocationSize: n/a Doesn't look like these are error messages. There should be error messages that correspond to the error messages you see in the PostgreSQL log. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: SV: Log files polluted with permission denied error messages after every 10 seconds

2021-03-17 Thread Laurenz Albe
000B7 I think what it would be most helpful to run "process monitor", so that you get a log of the system calls and errors; perhaps that shows some details that we cannot get from the error message. Yours, Laurenz Albe

Re: WAL-files is not removing authomaticaly

2021-03-16 Thread Laurenz Albe
On Tue, 2021-03-16 at 16:11 +0200, Andrew Anderson wrote: > postgres=# show wal_keep_segments; > wal_keep_segments > --- > 32 > (1 row) Ok, then I am out of ideas. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: WAL-files is not removing authomaticaly

2021-03-16 Thread Laurenz Albe
On Tue, 2021-03-16 at 15:31 +0200, Andrew Anderson wrote: > вт, 16 мар. 2021 г. в 14:21, Laurenz Albe : > > On Tue, 2021-03-16 at 09:49 +0200, Andrew Anderson wrote: > > > 2021-03-16 09:44:03.997 EET [97581] [] [] [] []DEBUG: attempting to > > > remove WAL s

Re: WAL-files is not removing authomaticaly

2021-03-16 Thread Laurenz Albe
s that a reasonably recent WAL segment? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: WAL-files is not removing authomaticaly

2021-03-16 Thread Laurenz Albe
ages] Could you set "log_checkpoints = on" and tell us what "checkpoint_timeout" is set to? WAL segments are only deleted after checkpoints. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Fwd: row level security (RLS)

2021-03-15 Thread Laurenz Albe
The key to this is "EXPLAIN (ANALYZE, BUFFERS)" for the query - that will tell you what is slow and why, so that you can tackle the problem. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Need help on understanding of wal_keep-segments and max_wal_size dependency.

2021-03-15 Thread Laurenz Albe
able to catch up any more. If you don't want to use "restore_command" or replication slots, your only option is to increase "wal_keep_segments". Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Refcursor

2021-03-15 Thread Laurenz Albe
e query, the first executes the query. Executing the query is what can take long. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: AW: Re: PostgreSQL container crash trouble.

2021-03-11 Thread Laurenz Albe
> No need for a backup. Correct? No, not correct. You could perhaps locate the checkpoint before that in the WAL with "pg_waldump" and manufacture an appropriate "backup_label" to start recovery from there. But by the time you reach 00010015008F, your recovery would stop, and the database would believe it was recovered. However, there might be some data modifications in the data files from a later point in time, which amounts to data corruption. WAL is called WAL because you always have to write to WAL first, only then to the data files. You cannot have a change to the data files that is not WAL logged. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: WAL-files is not removing authomaticaly

2021-03-11 Thread Laurenz Albe
ust about connects of applications. All that looks fine. If that happens again, set "log_min_messages" to "debug2". Then the log file will contain information abotu the WAL segments that PostgreSQL is trying to remove. That might give you some insight. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: WAL-files is not removing authomaticaly

2021-03-10 Thread Laurenz Albe
ave to figure out what is blocking WAL removal. Are there archive failures reported in "pg_stat_archiver" and the log? You say that replication is working fine, but try SELECT pg_current_wal_lsn(); on the primary and compare that with the "restart_lsn" of the replication slot. Look for strange messages in the log file on both servers. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: unexpected character used as group separator by to_char

2021-03-10 Thread Laurenz Albe
: > > show lc_numeric; > lc_numeric > - > fr_FR.UTF-8 That "space" is UNICODE U+202F ("Narrow No-Break Space"), and that's what your C library thinks to be the correct group separator for the French language. You can either replace the chara

Re: PostgreSQL container crash trouble.

2021-03-08 Thread Laurenz Albe
pall" the cluster and load it into a cluster that was newly created with "initdb". Any problems loading the data have to be resolved manually. > I thought this wal trouble was caused by disk IO troubles. But any error was > not raised in OS syslog. > I want to know

Re: Log files polluted with permission denied error messages after every 10 seconds

2021-03-05 Thread Laurenz Albe
me file > "pg_wal/00010005001B": Permission denied Windows? Don't let anti-virus software mess with the data directory. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: permission denied for pg_temp_XX when vacuuming

2021-03-03 Thread Laurenz Albe
the session that created them, so you can safely ignore these errors. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Tables used by a function

2021-02-26 Thread Laurenz Albe
On Fri, 2021-02-26 at 13:12 +0200, Yambu wrote: > Is there a quick way to list tables used by a function if the function is big > to search for tables manually? No. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Different query result, maybe bad index

2021-02-24 Thread Laurenz Albe
unning different C libraries or C library versions, so that the collations with the same name behave slightly differently. That could lead to the observed behavior with indexes on string data types. Make sure to use the same C library version on both systems. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: getting tables list of other schema too

2021-02-24 Thread Laurenz Albe
_0400_job | table | college > > > sys| scheduler_0450_job_argument | table | college > > yes I know that, but my doubt is why \dt is showing tables of other > schemas even I am setting the search_path. The problem is that you are not running PostgreS

Re: how does PostgreSQL determine how many parallel processes to start

2021-02-19 Thread Laurenz Albe
r" to limit the number of parallel workers available to a single query. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: how does PostgreSQL determine how many parallel processes to start

2021-02-19 Thread Laurenz Albe
greSQL will use as many of the planned workers as are currently available (max_parallel_workers). Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: permanent setting of config variables

2021-02-18 Thread Laurenz Albe
On Thu, 2021-02-18 at 11:42 +, Joao Miguel Ferreira wrote: > On Thu, Feb 18, 2021 at 10:52 AM Laurenz Albe > wrote: > > On Thu, 2021-02-18 at 09:09 +, Joao Miguel Ferreira wrote: > > > I have a few PL/pgSQL functions that use queires like "SHOW > > >

Re: when is pg_stat_archiver.stats_reset modified?

2021-02-18 Thread Laurenz Albe
ose that field is not "resettable" by the administrator, as I > tried to, but then what drives changes? SELECT pg_stat_reset_shared('archiver'); Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: permanent setting of config variables

2021-02-18 Thread Laurenz Albe
user specific config values > that would become accessible to the "SHOW " SQL comand. _product_name := current_setting('company.product'); Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: Order by not working

2021-02-16 Thread Laurenz Albe
On Tue, 2021-02-16 at 16:11 -0600, Ron wrote: > SQL is only intuitive to people who've done programming... :) SQL is quite counter-intuitive to people who have only done procedural programming. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: delete old cluster after pg_upgrade with -k option

2021-02-16 Thread Laurenz Albe
ed > hard links with old cluster. It is absolutely safe. It would actually be quite unsafe *not* to delete the old cluster, because if anybody managed to start it, data corruption would be the consequence. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com

Re: MultiXactMemberControlLock contention on a replica

2021-02-15 Thread Laurenz Albe
On Mon, 2021-02-15 at 12:40 -0800, Christophe Pettus wrote: > > On Feb 15, 2021, at 08:15, Laurenz Albe wrote: > > Right. I cannot think of any other reason, given that the standby only > > allows reading. It's just an "xmax", and PostgreSQL needs to read the

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