Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 7119
5 votes
Accepted

Store same sequence value in two columns

In order to not rely at all on currval, you might transform the INSERT queries in systematic way following this pattern: To insert from a select, instead of : INSERT INTO Test(columns) SELECT colum …
Daniel Vérité's user avatar
5 votes
Accepted

dumping database with "compressed data is corrupt" errors

According to a grep in the sources, this error ERROR: compressed data is corrupt happens in case of a decompression failure of a LZ-compressed TOAST'ed value. See http://doxygen.postgresql.org …
Daniel Vérité's user avatar
10 votes
Accepted

PostgreSQL force sslmode=verify-full

Maybe you want to limit the clients to those which present a given certificate, as described in Using client certificates: To require the client to supply a trusted certificate, place certificat …
Daniel Vérité's user avatar
10 votes
Accepted

Adding new null column to table caused lock

ALTER TABLE requires an ACCESS EXCLUSIVE lock. From the doc: ALTER TABLE changes the definition of an existing table. There are several subforms described below. Note that the lock level require …
Daniel Vérité's user avatar
2 votes

PostgreSQL bug(?) - logging with a minimum log level

the logger logs every statement Then that behavior comes from log_statement: log_statement (enum) Controls which SQL statements are logged. Valid values are none (off), ddl, mod, and a …
Daniel Vérité's user avatar
34 votes

How to get all roles that a user is a member of (including inherited roles)?

This is a simplified version of Craig Ringer's answer that a non superuser can use directly: SELECT oid, rolname FROM pg_roles WHERE pg_has_role( 'maxwell', oid, 'member'); pg_roles is essentia …
Daniel Vérité's user avatar
11 votes
Accepted

Does VACUUM FULL need ANALYZE

The statistics are produced from the values in the columns. As these values are not changed by VACUUM FULL or even by VACUUM, a fresh ANALYZE is not specifically required. If the database is in a mai …
Daniel Vérité's user avatar
14 votes

Avoid PG::TRDeadlockDetected

Adding a new value into a unique index locks out (until commit) any other transaction from inserting the same value. When doing that with multiple values in the same transaction, these locks accumulat …
Daniel Vérité's user avatar
1 vote

Monitoring Amazon RDS with pgtop

I don't know if that applies to Amazon RDS, but a possible reason for getting an empty list of queries with pgtop is when using a version older than 3.7.0 (released in August 2013) against a 9.2 or ne …
Daniel Vérité's user avatar
6 votes
Accepted

AWS RDS PostgreSQL dump/restore - syntax error

A pg_dump output with the -Fc (custom) is not a SQL script, it's a compressed archive that only pg_restore is able to handle. You may either pass the dump file to pg_restore and pipe its output to ps …
Daniel Vérité's user avatar
1 vote
Accepted

Do PostgreSQL toasted fields use any per row, in-table space?

Yes, see TOAST in Database Physical Storage TOAST usurps two bits of the varlena length word (the high-order bits on big-endian machines, the low-order bits on little-endian machines), thereby …
Daniel Vérité's user avatar
6 votes
Accepted

Deadlock detected on CREATE TABLE in PostgreSQL

Let's assume that the target table of the INSERT ("TableD") has a column with a foreign key to "TableC". An INSERT to this table must acquire a shared lock on "TableC" and will keep that lock until th …
Daniel Vérité's user avatar
8 votes
Accepted

Missing the pg_ctl package in Postgres 9.3 installation

In Debian/Ubuntu, the functionalities of pg_ctl are provided by pg_ctlcluster. Quoted from its manpage: NAME pg_ctlcluster - start/stop/restart/reload a PostgreSQL cluster SYNOPSIS …
Daniel Vérité's user avatar
3 votes

changed password for postgres login in pgAdmin, now can't connect to server

I think there are two unrelated problems here: 1) failure to connect on Unix domain socket This part of ps output: /opt/PostgreSQL/9.3/bin/postgres -D /home/dev/postgres_data indicates that yo …
Daniel Vérité's user avatar
2 votes
Accepted

Issue working with Postgres on Windows

The PSQL Console in pgadmin3 consists of opening a terminal and running psql --username yourname [other options] dbname inside it for you, with yourname and dbname being taken from what you've used to …
Daniel Vérité's user avatar

15 30 50 per page